code in .aspx page and not in the code-behind

M

maflatoun

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
 
N

Nicholas Paldino [.NET/C# MVP]

MA,

In the page, you would have to do something like this:

<a href="default.aspx?section<%= (string) Request["section"] %>">

Hope this helps.
 

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

Top