?
Solved

Request.QuerStrin value in gridview hydperlinkfield

Posted on 2009-02-19
3
Medium Priority
?
239 Views
Last Modified: 2012-08-13
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

0
Comment
Question by:MGGReddy
2 Comments
 
LVL 18

Expert Comment

by:Richard Lee
ID: 23689410
Try the following:

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

0
 
LVL 10

Accepted Solution

by:
jabcoco earned 2000 total points
ID: 23691119
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

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month13 days, 21 hours left to enroll

807 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question