I have the following hyperlink in my GridView. I want two values to be
passed on to another aspx page when I click on hyperlink.
<asp:HyperLinkField DataTextField="proxy" HeaderText="Proxy"
NavigateUrl="~/Proxy.aspx"
DataNavigateUrlFormatString="Proxy.aspx?FirstName={0},LastName={1}"
DataNavigateUrlFields="FirstName,LastName" />
In My proxy.aspx page I did the following to get the values. But it giving
me
Mary LastName=Miller
But the output should be
Mary Miller
string yourValue = (Request.QueryString["FirstName"]);
string yourValue2 = (Request.QueryString["LastName"]);
this.Label1.Text = Convert.ToString(yourValue + yourValue2);
Rak - 07 Sep 2007 20:40 GMT
use & as separater instead of ,
DataNavigateUrlFormatString="Proxy.aspx?FirstName={0}&LastName={1}"
Rakesh
> I have the following hyperlink in my GridView. I want two values to be
> passed on to another aspx page when I click on hyperlink.
[quoted text clipped - 14 lines]
> string yourValue2 = (Request.QueryString["LastName"]);
> this.Label1.Text = Convert.ToString(yourValue + yourValue2);