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

  1. #1

    Default Script in WebForm

    I am not able to use the script below,
    its giving and Execption (MessageName Space)
    THE TYPE OR NAMESPACE NAME 'MESSAGE' COULD NOT BE FOUND

    this is an example from the GOTDOTNET site

    [url]http://samples.gotdotnet.com/quickstart/util/srcview.aspx?[/url]
    path=/quickstart/aspplus/samples/webforms/controls/controls
    3.src&file=CS\controls3.aspx&font=3

    <script language="C#" runat="server">


    void EnterBtn_Click(Object Src, EventArgs E) {
    Message.Text = "Hi " + HttpUtility.HtmlEncode
    (Name.Text) + ", welcome to ASP.NET!";
    }

    </script>

    AV Guest

  2. Similar Questions and Discussions

    1. asp.net how to login to AD from a webform
      I have a webserver 2003 and a AD server 2003, I need to create an intranet app and I want the users login to the Webserver using their AD...
    2. Run .exe from WebForm
      How can I run an .exe (located at the server) from within a WebForm? For example, run "word.exe mydoc.txt"
    3. Including WebForm Image Control in a Webform Table Control
      What is the code for including an image control in a Table control of a WebForm ???? regards
    4. applet in a webform
      I have an applet that I instantiate on a web form using an applet tag such as: <Applet> stuff in here </Applet> Assume the name of the applet...
    5. Hot to execute an visual basic script from a webform
      hi, is it posible to call a .vbs from a webform?
  3. #2

    Default Re: Script in WebForm

    The script is referencing a Control (most likely a Label) named "Message".
    If it isn't on your Page, that would cause the problem you describe.

    --
    HTH,

    Kevin Spencer
    Microsoft MVP
    ..Net Developer
    [url]http://www.takempis.com[/url]
    Complex things are made up of
    lots of simple things.

    "AV" <anilvarmaen@hotmail.com> wrote in message
    news:01b801c35b77$3bd163c0$a301280a@phx.gbl...
    > I am not able to use the script below,
    > its giving and Execption (MessageName Space)
    > THE TYPE OR NAMESPACE NAME 'MESSAGE' COULD NOT BE FOUND
    >
    > this is an example from the GOTDOTNET site
    >
    > [url]http://samples.gotdotnet.com/quickstart/util/srcview.aspx?[/url]
    > path=/quickstart/aspplus/samples/webforms/controls/controls
    > 3.src&file=CS\controls3.aspx&font=3
    >
    > <script language="C#" runat="server">
    >
    >
    > void EnterBtn_Click(Object Src, EventArgs E) {
    > Message.Text = "Hi " + HttpUtility.HtmlEncode
    > (Name.Text) + ", welcome to ASP.NET!";
    > }
    >
    > </script>
    >

    Kevin Spencer Guest

  4. #3

    Default Re: Script in WebForm

    System.Web.HttpUtility.HtmlEncode

    "AV" <anilvarmaen@hotmail.com> wrote in message
    news:01b801c35b77$3bd163c0$a301280a@phx.gbl...
    > I am not able to use the script below,
    > its giving and Execption (MessageName Space)
    > THE TYPE OR NAMESPACE NAME 'MESSAGE' COULD NOT BE FOUND
    >
    > this is an example from the GOTDOTNET site
    >
    > [url]http://samples.gotdotnet.com/quickstart/util/srcview.aspx?[/url]
    > path=/quickstart/aspplus/samples/webforms/controls/controls
    > 3.src&file=CS\controls3.aspx&font=3
    >
    > <script language="C#" runat="server">
    >
    >
    > void EnterBtn_Click(Object Src, EventArgs E) {
    > Message.Text = "Hi " + HttpUtility.HtmlEncode
    > (Name.Text) + ", welcome to ASP.NET!";
    > }
    >
    > </script>
    >

    MS News 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