Get the value from URL and pass to another page [Resolved]

Posted by Nerdanalysis under ASP.NET on 10/9/2012 | Points: 10 | Views : 1116 | Status : [Member] | Replies : 3
Hi,

I need to get the value from the url and create a link on that basis eg.

<div onclick="location.href='supplierdetailed.aspx?supplierid="<%#Page.Request.QueryString["supplierid"]%>"';" style="cursor:pointer;"><img src="../Resources/ws.img/aboutsupp-over.png" /></div>

Here supplierid is value from URL. The result url i got is supplierdetailed.aspx?supplierid= eg without supplierId . Please help me out?

Kind regards
Rakesh




Responses

Posted by: Vforvijay on: 10/9/2012 [Member] Starter | Points: 50

Up
0
Down

Resolved
hi refer the below code..........
'<%= Request.QueryString["option"]%>'

Nerdanalysis, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nerdanalysis on: 10/9/2012 [Member] Starter | Points: 25

Up
0
Down
thanks Vijay....how did you know that...........and what is the difference between '<%= Request.QueryString["option"]%> and '<%# Request.QueryString["option"]%>
and '<% Request.QueryString["option"]%>

Nerdanalysis, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nerdanalysis on: 10/9/2012 [Member] Starter | Points: 25

Up
0
Down
Oh yeah....I forgot to mention our dear friend Eval as well..........when to use Eval with '<%= Request.QueryString["option"]%> and '<%# Request.QueryString["option"]%>
and '<% Request.QueryString["option"]%>. What are the difference among them..

Kind regards
Rakesh

Nerdanalysis, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response