Script in WebForm

A

AV

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

http://samples.gotdotnet.com/quickstart/util/srcview.aspx?
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>
 
K

Kevin Spencer

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
http://www.takempis.com
Complex things are made up of
lots of simple things.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,266
Latest member
DavidaAlla

Latest Threads

Top