Displaying variable value in page?

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
 
S

SirMike

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%> >

?
 
K

Karl Seguin [MVP]

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
 
B

brett

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
 

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,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top