messagebox in ASP.NET using VB.NET

Discussion in 'ASP .Net Web Controls' started by Matthew Louden, Oct 22, 2003.

  1. how to show the message box in ASP.NET? I try MessageBox.Show, but not work.
     
    Matthew Louden, Oct 22, 2003
    #1
    1. Advertising

  2. The MessageBox class is a class that displays a MessageBox on the machine on
    which the app is running. An ASP.Net app runs on a server, but the user is
    on another machine altogether, somewhere out there in the vast binary sea of
    the Internet. There is no way that the MessageBox class can be of any use to
    an ASP.Net app. to display a "Message Box" on the client browser, you would
    use the JavaScript "alert()" method. This would have to be added to the HTML
    of the page sent to the client. You could add such a script using
    Page.RegisterStartupScript(). Example:

    Dim strScript As String
    strScript = "<script type=""text/javascript"">alert('Help! I am being held
    captive by Wile E Coyote!')</script>"
    If Not Page.IsStartupScriptRegistered("MyScript") Then
    Page.RegisterStartupScript("MyScript", strScript)
    End If

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    http://www.takempis.com
    Big Things are made up of
    Lots of Little Things.

    "Matthew Louden" <> wrote in message
    news:%...
    > how to show the message box in ASP.NET? I try MessageBox.Show, but not

    work.
    >
    >
     
    Kevin Spencer, Oct 22, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matthew Louden

    messagebox in ASP.NET using VB.NET

    Matthew Louden, Oct 22, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    10,141
    Kevin Spencer
    Oct 22, 2003
  2. Paul Wilson

    how to display a MessageBox in ASP.net

    Paul Wilson, Jun 21, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    4,146
    =?Utf-8?B?QW5vdGhlciBvcHRpb24=?=
    Jun 21, 2004
  3. tma

    ASP.NET Messagebox

    tma, Jul 22, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    12,227
    Steve C. Orr [MVP, MCSD]
    Jul 23, 2004
  4. Yummy

    ASP.Net - prompt out messagebox

    Yummy, Mar 19, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    12,408
    Ken Cox [Microsoft MVP]
    Jun 5, 2005
  5. Steve Kershaw

    How can I display a MessageBox in ASP.NET?

    Steve Kershaw, May 26, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    3,930
    Steve C. Orr [MVP, MCSD]
    May 26, 2006
Loading...

Share This Page