I had to show an alert on a button click,but when ever i "OK" it always postsback.
To avoid such a thing simply we can use HTML Control.
have the following code in code-behind window.
Button.Attributes.Add("onclick","alert('Are You Sure ??');return false;");
This will prevent postback....
Monday, December 29, 2008
Avoid Postback
Labels:
ADO.NET 2.0,
ASP.NET,
Vijaya Kadiyala,
Visual Studio 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment