Request.QuerStrin value in gridview hydperlinkfield

I want a querystring value to be concatenated in the  hyperlink field which has the value from another data column

Eg: DataNavigateFormatURLString="page.aspx?value=<%Request.QueryString["val"]%>&val2={0}"
output should be like page.aspx?value=12&val2=ABCD
12 is from the page's query string and ABCD is from another column in the datagrid.
<asp:HyperLinkField DataNavigateUrlFields="Plan ID" DataNavigateUrlFormatString="NominationRegistration.aspx?Plan={0}&schedule='<%$ Schedule>'"
                        HeaderText="Register" Text="Register for this Certification" />

Open in new window

MGGReddyAsked:
Who is Participating?
 
jabcocoConnect With a Mentor Commented:
Should use DataNavigateUrlFields and DataNavigateUrlFormatString, thats why they exist ;)

<asp:HyperLinkField DataNavigateUrlFields="Plan,ID" DataNavigateUrlFormatString="NominationRegistration.aspx?Plan={0}&schedule{1}" DataTextField="YourColumnTextToDisplay" />

Open in new window

0
 
Richard LeeSoftware EnthusiastCommented:
Try the following:

='<%# String.Format("page.aspx?value={0}&val2={1}", Request.QueryString["val"], val2) %>'

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.