0

how to use pop up menu for giving the msg for confirming del command from user. can u provide me d code

5
Contributors
5
Replies
6
Views
9 Years
Discussion Span
Last Post by peter_budo
0

Nothing complex

private void yourActionCalled_MouseUp(object sender, MouseEventArgs e)
{
     DialogResult result =
         MessageBox.Show("Are you sure you want to close?",
         "Close Application?",
         MessageBoxButtons.YesNo, MessageBoxIcon.Question, 0, 0);
     switch (result)
     {
         case DialogResult.Yes:
             someAction();                   
             break;
     }
}
0

That's not right. You can't use WinForms code to do that in ASP.NET . There isn't a DialogBox control.

It's a little more complicated than that. The way I normally make a modal dialog box is to use the Modal Popup control in the AJAX.NET toolkit. You can build a panel, lay it out to look like a MessageBox, and then at the right time call an event to pop it up.

That's one way of approaching it. If you just want to pop up an informational Messagebox with little interaction, you could try using a JavaScript function or something.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.