Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How to appear msgbox in ASP Page


Hi Friends

I'm new to ASP
I want to know that how to display message box in asp page
I hope my friends on programmersheaven will help me
U can mail the code at < bluish_roses@yahoo.com >

Urs
Blue Rose

Comments

  • raylouwraylouw Member Posts: 30
    :
    : Hi Friends
    :
    : I'm new to ASP
    : I want to know that how to display message box in asp page
    : I hope my friends on programmersheaven will help me
    : U can mail the code at < bluish_roses@yahoo.com >
    :
    : Urs
    : Blue Rose
    :


    ASP doesnt have a message box function. If you want one you will have to do something similar to the following:

    1)
    string strMessage = "Your message here";

    StringBuilder sb = new StringBuilder("");
    sb.Append("");
    sb.AppendFormat("alert("{0}");", strMessage);
    sb.Append("")

    Page.RegisterClientScript("AlertScript", sb.ToString());

    I think that that will do it.
  • weirdmixweirdmix Member Posts: 27
    :
    : Hi Friends
    :
    : I'm new to ASP
    : I want to know that how to display message box in asp page
    : I hope my friends on programmersheaven will help me
    : U can mail the code at < bluish_roses@yahoo.com >
    :
    : Urs
    : Blue Rose
    :
    hi:
    the only way you can make a msgbox appear is running the script in "client" side of the page.

    if you use server tags (asp tags), you can have an error message.

    but vbscript is useful to do that kind of things.

    Here is an example.

    <%'this code would run on server
    strMsg = "Type your message here.."
    %>

    'this code would run on client
    msgbox "<%=strMsg%>"



    Hoping this helps you..

Sign In or Register to comment.