I am using MessageBox class in Asp.NET with C# by imposing the namespace
using System.Windows.Forms I have the following code:
/* Method for displaying the Message Box */
public void MsgBox()
{
string message = "Do you want to modify the rate list?";
string caption = "";
MessageBoxButtons buttons = MessageBoxButtons.YesNoCancel;
DialogResult result;
result = MessageBox.Show(message, caption, buttons);
if (result == DialogResult.Yes) {
Response.Redirect("PaperRateList.aspx");
}
}
/*Calling of the above method in the following event */
protected void Save_Click(object sender, EventArgs e)
{
CompanyMaster_Insert();
RateList_Save();
MsgBox(); /*method*/
}
Now the problem is that the message box is appearing behind the form in minimized mode.and the form can be closed before closing the message bos.I want this messagebox on the form and i want to close the form after closing the message box.