The code you are trying is the ASP kind of style, with asp.net 2.0 what you can do is in the page load write a piece of code like this
first in the aspx file <asp:Label runat="server" Text="" id="txt1"></asp:Label>
then in the .aspx.
vb or .aspx.cs files in the page_load write the following code
txt1.text = value - for anyone
Vb or CS syntax.
Check and see if this helps, else will try and help you better. Also give us an idea what scenario you plan to use it for.
Vincent Thomas
Bangalore