So is HyperLink1 passing the value to the next page? If so your syntax is wrong. It should be <%# "Payment.aspx?S=" Eval("ValueForS") %>. You would use that syntax if you were trying to get the value from a sending page.
Remember to mark as answer if this post answered or solved your problem.
Marked as answer by DreamBig on Apr 27, 2009 10:45 AM
u can also use Application.Set("name", & ___ &) method.... and retrive the value from Application.get("name") in the page whr u want to retrivw the value
DreamBig
Participant
1339 Points
622 Posts
passing querystring parameters from aspx page
Apr 25, 2009 09:24 AM|LINK
Hi,
i want to strictly pass the querystring from aspx page & not from code behind then how to do it?
i used
<asp:HyperLink ID="HyperLink1" runat="server" Text="Pay"
NavigateUrl='<%# "Payment.aspx?S=" & Request.QueryString("S") %>' />
but it doesn't work.From code behind it works.
But i want it from aspx page or else is it not possible.
Also the hyperlink is not inside gridview.
any idea???
passing querystring parameters from aspx page
My Blog
b471code3
Star
13877 Points
2598 Posts
Re: passing querystring parameters from aspx page
Apr 25, 2009 03:13 PM|LINK
So is HyperLink1 passing the value to the next page? If so your syntax is wrong. It should be <%# "Payment.aspx?S=" Eval("ValueForS") %>. You would use that syntax if you were trying to get the value from a sending page.
Segundo
Star
10892 Points
1567 Posts
Re: passing querystring parameters from aspx page
Apr 25, 2009 03:52 PM|LINK
Hi,
If you don't want server side access for the control... then only use a html anchor tag:
<a href='Payment.aspx?S=<%= Request.QueryString("S") %>'>Pay</a>
Any doubt, post your comment.
Blog: http://www.neuronasoft.net
DreamBig
Participant
1339 Points
622 Posts
Re: passing querystring parameters from aspx page
Apr 27, 2009 10:48 AM|LINK
I m trying to get the value from the sending page.
I have value of S on one page & from that page I want that value & redirect to another page.
but using NavigateUrl='<%# "Payment.aspx?S=" & Request.QueryString("S") %>' , is not working.
it works on page load of the first page i set page.databind().
why so???any ideas??without it also it shud work...
My Blog
malcolms
All-Star
18687 Points
3124 Posts
MVP
Re: passing querystring parameters from aspx page
Apr 27, 2009 10:52 AM|LINK
Have you tried to construct it in your code, maybe in the Page Load event?
HyperLink1.NavigateUrl = "Payment.aspx?S=" + Request.QueryString["S"];
Rangapure.S....
Participant
765 Points
237 Posts
Re: passing querystring parameters from aspx page
Apr 27, 2009 11:42 AM|LINK
u can also use Application.Set("name", & ___ &) method.... and retrive the value from Application.get("name") in the page whr u want to retrivw the value
DreamBig
Participant
1339 Points
622 Posts
Re: passing querystring parameters from aspx page
Apr 27, 2009 01:51 PM|LINK
@malcolms - from code behind it does work..but i want it in aspx page.
My Blog