GridView

G

Guest

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);
 
G

Guest

use & as separater instead of ,
DataNavigateUrlFormatString="Proxy.aspx?FirstName={0}&LastName={1}"

Rakesh
 

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

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top