Created
August 19, 2010 19:06
-
-
Save house9/538625 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public partial class JavaScriptConfirm : System.Web.UI.Page | |
{ | |
protected void Page_Load(object sender, EventArgs e) | |
{ | |
// wire the client side onclick to TestButton4 | |
this.TestButton4.Attributes.Add("onclick", "return AreYouSure();"); | |
if(Page.IsPostBack) | |
{ | |
Response.Write | |
( | |
String.Format("Page_Load, IsPostBack: {0}<hr>", DateTime.Now.ToLongTimeString()) | |
); | |
} | |
} | |
// the server side 'event' kicked off when asp:button is clicked | |
protected void InvokeServerSideMethod(object sender, EventArgs e) | |
{ | |
Response.Write | |
( | |
String.Format("InvokeServerSideMethod, E: {0}<hr>", DateTime.Now.ToLongTimeString()) | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment