What's wrong with this?

V

vbMark

The below code gives this message:
CS1519: Invalid token '=' in class, struct, or interface member declaration


What am I doing wrong?



<script language="C#" runat="server">
string sInfo = Request.QueryString["Info"];
TextBox1.Text = sInfo;


Thanks!
 
M

Marina

script tags run on the server can contain only functions and class level
variables. They may not contain executable code such as changing the text
in a textbox outside a function.
 
V

vbMark

Oh, I see. Thanks.

script tags run on the server can contain only functions and class
level variables. They may not contain executable code such as
changing the text in a textbox outside a function.

vbMark said:
The below code gives this message:
CS1519: Invalid token '=' in class, struct, or interface member declaration


What am I doing wrong?



<script language="C#" runat="server">
string sInfo = Request.QueryString["Info"];
TextBox1.Text = sInfo;


Thanks!
 

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,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top