Equivalent of Javascript Alert(string) method in C# script.

Discussion in 'ASP .Net' started by Erik Veldkamp, Aug 3, 2003.

  1. Hi there,

    When I use javascript I can call the alert(string) method, to show an alert
    window.

    How can I do the same when I use C# script?

    Thanks for your help
     
    Erik Veldkamp, Aug 3, 2003
    #1
    1. Advertising

  2. Erik Veldkamp

    Anatoly Guest

    There is no equivalent for alert(), cause C# is server-side language,
    alert() : client-side script
    What you can do: write to client alert() script like:

    RegisterClientScriptBlock("myAlert", "<script
    language='javascript'>alert('Here alert');</script>")
    HTH

    "Erik Veldkamp" <> wrote in message
    news:bgijmp$3ns$...
    > Hi there,
    >
    > When I use javascript I can call the alert(string) method, to show an

    alert
    > window.
    >
    > How can I do the same when I use C# script?
    >
    > Thanks for your help
    >
    >
     
    Anatoly, Aug 3, 2003
    #2
    1. Advertising

  3. Erik Veldkamp

    rogachez

    Joined:
    Jun 18, 2010
    Messages:
    1
    Well, this has to be said:

    ASP is server side scripting,
    C# can be used to program Windows (and then clientside) applications.

    And yes, you can use this : MessageBox.Show()
    To fullfill "Alert" and "Confirm" tasks.
     
    rogachez, Jun 18, 2010
    #3
    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. jeremit0
    Replies:
    0
    Views:
    309
    jeremit0
    Apr 8, 2005
  2. jeremit0
    Replies:
    2
    Views:
    314
    jeremit0
    Apr 9, 2005
  3. Mersh
    Replies:
    0
    Views:
    514
    Mersh
    Mar 13, 2007
  4. Ganesh
    Replies:
    0
    Views:
    574
    Ganesh
    Jun 29, 2007
  5. Replies:
    3
    Views:
    313
    Laurent Bugnion
    Aug 24, 2006
Loading...

Share This Page