HOW TO SHOW/DISPLAY MESSAGE BOX IN C# ASP.NET FORMS?

Takeshi Okada

Total Post:89

Points:629
Posted by  Takeshi Okada
C# 
 969  View(s)
Ratings:
Rate this:

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

  1. ezra heywood

    Post:145

    Points:1019
    Re: How to show/display message box in C# asp.net forms?

    Use:

     

    string display = "Pop-up!";

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

  1. Kamlakar Singh

    Post:28

    Points:196
    Re: How to show/display message box in C# asp.net forms?

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

     

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

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

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!