In Focus

Forums - C# Corner

Forum guidelines

Message Box in c#

Oct 11 2010 7:18 AM

i want to show message in messagebox "Data Saved successfully" when click submit botton
i use below code but message box not show plz send me solution for this
protected void btnSaveUpdate_Click(object sender, EventArgs e)

"Data Saved Successfully !");

private void MessageBox(string msg)
Label lbl = new Label();
lbl.Text =
"<script language='javascript'>" + Environment.NewLine + "window.alert('" + msg + "')</script>";

but above code not give any responce
i also use one more code but same problem
private void MessageBox(string message)
if (!string.IsNullOrEmpty(message))
Response.Write("<script type=\"text/javascript\" language=\"javascript\">");
Response.Write("alert('" + message + "');");


Answers (10)


Build smarter apps with Machine Learning, Bots, Cognitive Services - Start free.

Start Learning Now