469,613 Members | 1,252 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,613 developers. It's quick & easy.

Displaying a string var in the .aspx page

Hi,

I have the following code in the code-behind file

public string section;
section = Request["section"].ToString()

and I like to display it in my .aspx page (included .ascx) but it's not
working.

I tried
<a href="default.aspx?section=<#=section#>">

is it possible to just place Request["section"].ToString() in for ex.
default.aspx?section=Request["section"].ToString() ????
Thanks
MA

May 8 '06 #1
2 1917
Hi,

Try replacing the # symbols in "<#=section#>" with % symbols.

Doug

"mazdotnet" wrote:
Hi,

I have the following code in the code-behind file

public string section;
section = Request["section"].ToString()

and I like to display it in my .aspx page (included .ascx) but it's not
working.

I tried
<a href="default.aspx?section=<#=section#>">

is it possible to just place Request["section"].ToString() in for ex.
default.aspx?section=Request["section"].ToString() ????
Thanks
MA

May 8 '06 #2
<%=xxx%>

Daniel Fisher(lennybacon) | newtelligenceR AG
blog: http://staff.newtelligence.net/danielf
usergroup: http://vfl-niederrhein.net
-----Original Message-----
From: mazdotnet [mailto:ma*******@gmail.com]
Posted At: Monday, May 08, 2006 3:39 PM
Posted To: microsoft.public.dotnet.framework.aspnet
Conversation: Displaying a string var in the .aspx page
Subject: Displaying a string var in the .aspx page

Hi,

I have the following code in the code-behind file

public string section;
section = Request["section"].ToString()

and I like to display it in my .aspx page (included .ascx) but it's not
working.

I tried
<a href="default.aspx?section=<#=section#>">

is it possible to just place Request["section"].ToString() in for ex.
default.aspx?section=Request["section"].ToString() ????
Thanks
MA

May 8 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Vinay | last post: by
2 posts views Thread by Carole MacDonald | last post: by
reply views Thread by Fronky | last post: by
3 posts views Thread by CLEAR-RCIC | last post: by
7 posts views Thread by mosipenko | last post: by
15 posts views Thread by Kevin Hanken | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.