code_junkie

Prevent hiding of ModalPopupExtender when ok or cancel is clicked

Nov 12th, 2011
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. function conditionalHide(clientID)
  2. {
  3. if (confirm('You sure?'))
  4. {
  5. $find(clientID).hide();
  6. }
  7. }
  8.  
  9. protected void Page_Load(object sender, EventArgs e)
  10. {
  11. if (!IsPostBack)
  12. {
  13. btnOK.OnClientClick = string.Format("conditionalHide('{0}'); return false;",
  14. panPopup_ModalPopupExtender.ClientID);
  15. }
  16. }
Add Comment
Please, Sign In to add comment