<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Confirmation Box Example</title>
<script type="text/javascript">
//Confirmation box sample
function ConfirmationBox() {
var result = confirm("Are you sure you want to continue?");
if (result == true) {
return true;
}
else {
var lbl = document.getElementById('lbltxt');
lbl.innerHTML = "";
return false;
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="btnSubmit" runat="server" Text="Submit"
OnClientClick="return ConfirmationBox()" onclick="btnSubmit_Click" />
<asp:Label ID="lbltxt" runat="server"></asp:Label>
</div>
</form>
</body>
</html>
|
protected void btnSubmit_Click(object sender, EventArgs e)
{
lbltxt.Text = "Welcome to Confirmationbox page";
}
|
|
If you enjoyed this post, please support the blog below. It's FREE! Get the latest Asp.net, C#.net, VB.NET, jQuery, Plugins & Code Snippets for FREE by subscribing to our Facebook, Twitter, RSS feed, or by email. |
|||
Subscribe by RSS
Subscribe by Email
|
|||
|
|

Subscribe by RSS
Subscribe by Email
4 comments :
nice blog bro. where do you work
Hi suresh,I need to take one combo box and in dat combo box i need to bind the all stored procedures from backend,by clicking on particular s.p. below the combo box i need to display how many parameters required for a selected s.p.(i need to display dat parameters in a lables) then i need to enter the data and the data should be displayed in a gridview on button click(button name is execute)..This is the exact requirement..can u help me plz..
sir pls help me out...how to use javascript in child page which is derived from master page.it works in normal asp.net page
very good post