Home > DeveloperSection > Forums > How to show/display message box in C# asp.net forms?
Takeshi Okada
Takeshi Okada

Total Post:89

Posted on    December-19-2014 10:34 PM

 ASP.Net C# 

 2 Reply(s)
 948  View(s)
Rate this:

I want to add/show some message with a OK button in c# asp.net without using the windows.forms name space.

ezra heywood
ezra heywood

Total Post:145

Posted on    December-20-2014 5:45 AM



string display = "Pop-up!";

            ClientScript.RegisterStartupScript(this.GetType(), "yourMessage", "alert('" + display + "');", true);

Kamlakar Singh
Kamlakar Singh

Total Post:28

Posted on    December-20-2014 6:29 AM

One easy solution is to register some JavaScript code in your page:


string script = "alert(\"Hello!\");";

ScriptManager.RegisterStartupScript(this, GetType(),ServerControlScript", script, true);

Don't want to miss updates? Please click the below button!

Follow MindStick