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

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

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

    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 Guest

  2. Similar Questions and Discussions

    1. Javascript alert message problem
      Hello. I'm developing and testing a web application using VS.NET 2003, VB, .NET Framework 1.1.4322, ASP.NET 1.1.4322 and IIS5.1 on a WIN XP Pro,...
    2. alert statement in javascript not shown
      Hi, I am new to Javascript and coldfusion. I have a cfm search page that allow user to search by state and/or city. In the form statement...
    3. Javascript alert
      Hi, I have a Javascript alert as below. alert('Please enter Todays Date'); This works fine. But I want an apostrophy after the y in...
    4. confirm method in javascript
      Is there a way to set the default option to 'Cancel' rather than 'Ok' in Javascript confirm method? cmdDelete.Attributes.Add("onClick",...
    5. Javascript submit method
      Hello When using html forms & FMP does FMP absolutely require a <input type="submit" value="-NEW"> tag or can I get away with using something...
  3. #2

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

    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" <erik.veldkamp@wxs.nl> wrote in message
    news:bgijmp$3ns$1@reader10.wxs.nl...
    > 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 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139