Ejemplo n.º 1
0
 /// <summary>
 /// Initializes the deafult buttons with the default functions on the MessageBox.
 /// </summary>
 /// <param name="buttonType">button type to display on the MessageBox.</param>
 /// <param name="exception">CustomException object</param>
 public MessageBox(CustomException ex, MessageBoxDefaultButtonEnum buttonType)
 {
     this.Message = ex.AlertMessage;
     this.Caption = ex.Caption;
     /* you can set the event for the button funtion e.g.
         call server side event.
         this.CallBackFunction = function(v,m,f){if(v == 'OK'){setTimeout('__doPostBack(\\'btnFake\\',\\'\\')', 0);}}
     */
     this.CallBackFunction = "null";
     SetDefaultSingleButtonSettings(buttonType);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initialize the Custom buttons and their call back function.
 /// </summary>
 /// <param name="buttons">List of Buttons</param>
 /// <param name="focus">Index of the button to focus</param>
 /// <param name="callBackFunction">Javascript or JQuery function to execute on the button click.</param>
 /// <param name="exception">CustomException object thrown in the application.</param>
 public MessageBox(CustomException ex, List<MessageButton> buttons, int focusIndex, string callBackFunction)
 {
     // implement according to your requirement
 }
Ejemplo n.º 3
0
 protected void btnShowImpromptu_Click(object sender, EventArgs e)
 {
     CustomException ex= new CustomException("DeepAsp MessageBox", "You have done it , good job.");
     MessageBox messageBox = new MessageBox(ex, MessageBoxDefaultButtonEnum.OK);
     messageBox.Show(this);
 }