Displaying variable value in page?

  • Thread starter Thread starter brett
  • Start date Start date
B

brett

I have assigned a value to a variable defined in a code behind page.
I'd like to display a variable named myvar in the aspx page's

<meta http-equiv="refresh" content=myvar>

tag. If I put myvar there, it surrounds it in quotes. How can I get
the value of myvar to render?

Thanks,
Brett
 
Dnia 2 Nov 2006 20:57:22 -0800, brett napisa³(a):
I have assigned a value to a variable defined in a code behind page.
I'd like to display a variable named myvar in the aspx page's

<meta http-equiv="refresh" content=myvar>

tag. If I put myvar there, it surrounds it in quotes. How can I get
the value of myvar to render?

Have you tried:
<meta http-equiv="refresh" content=<%= myvar%> >

?
 
That'll work, just make sure myVar is protected.

Also, if you are using 2.0, you can manipulate the header elements via
Page.Header where you could add a new control (such as a literal).

Karl
 
Karl said:
That'll work, just make sure myVar is protected.

Also, if you are using 2.0, you can manipulate the header elements via
Page.Header where you could add a new control (such as a literal).

This is 2.0. I was sure which header element to choose for this but
<%= myvar%> did work.

Thanks,
Brett
 
Back
Top