What's wrong with this?

  • Thread starter Thread starter vbMark
  • Start date Start date
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!
 
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.
 
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!
 
Back
Top