Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 9th, 2012  |  syntax: None  |  size: 0.64 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Display modified confirm on the button submit from button action
  2. <ajaxToolkit:ConfirmButtonExtender ID="cbe" runat="server"
  3.    TargetControlID="Cancel"
  4.            ConfirmText="Are you sure you want to click this?"
  5.          />
  6.        
  7. public void display()
  8. {
  9.    string error="my error";
  10.    cbe.ConfirmText = error;
  11.  
  12. }
  13.        
  14. protected void Cancel_Click(object sender, ImageClickEventArgs e)
  15.         {   display();
  16.             anothermethod();
  17.             Response.Redirect("home.aspx");
  18.         }
  19.        
  20. protected void Page_Load(object sender, EventArgs e)
  21. {
  22.     if (!IsPostBack)
  23.     {
  24.         string error = "my error";
  25.         cbe.ConfirmText = error;
  26.     }
  27. }