I have a button on my ASP.NET webforms application when i click it I get a yes no message box, behind the scenes i.e., the button click event I have some code which deletes data from the database. I would like to delete code to only run when the use selects yes on the message box.
I have got the message box working using the script below
<script type="text/Javascript" language ="javascript" >
function confirm_meth()
{
if( confirm("Do you want to continue!Click 'OK'")==true)
{
document.writeln ("<b>You had click on 'YES' Button</b>");
}
else
{
document.writeln ("<b>You had clic on 'CANCEL' Button</b>");
}
}
</script>
<td class="auto-style5">
<asp:Button ID="DeleteJobsbtn" runat="server" Text="Delete Jobs"
OnClientClick =" return confirm_meth()"/>
</td>
How do i send this to the code behind to the click event?
I am using ASP.net Webforms VB.Net