Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to show JavaScript popup from C#

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 156
    Comment on it

    Hello all,

    In asp.net if we want to show JavaScript pop box from Code behind file (C# file), we can do that by using following block of code :

    string script = "<script language='javascript'>alert('This is a JavaScript popup');</script>";
    ScriptManager.RegisterStartupScript(Page, this.GetType(), "Alert Message", script, false);
    

    Here we are using ScriptManager class and we can use RegisterStartupScript method of that class we can show the popup box.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: