By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,384 Members | 845 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,384 IT Pros & Developers. It's quick & easy.

Displaying variable value in page?

P: n/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?

Thanks,
Brett

Nov 3 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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%

?

--
SirMike - http://www.sirmike.org

C makes it easy to shoot yourself in the foot; C++ makes it harder, but
when you do, it blows away your whole leg. - Bjarne Stroustrup
Nov 3 '06 #2

P: n/a
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

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"SirMike" <si*****@FUCKSPAMMERSpoczta.onet.plwrote in message
news:n2*****************************@40tude.net...
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%

?

--
SirMike - http://www.sirmike.org

C makes it easy to shoot yourself in the foot; C++ makes it harder, but
when you do, it blows away your whole leg. - Bjarne Stroustrup

Nov 3 '06 #3

P: n/a

Karl Seguin [MVP] wrote:
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

Nov 3 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.