Solved

using asp:HyperLinkField to pass querystring

Posted on 2011-09-28
1
244 Views
Last Modified: 2013-12-17
I have a datagrid with a DataKeyName of PasswordID
I want one of my columns in the grid to be an asp:HyperLinkField  So the dataTextField will be "Site" and I want my NavigateURL to  carry a variable so something like:  

mypage.aspx?SiteID=@SiteId
is this possible?

If so how do I declare @SiteId given that my DataKeyName is already taken?

I tried mypage.aspx?SiteID= <%#Eval("SiteId") %> but that throws an error.


Many thanks in advance
0
Comment
Question by:forsters
1 Comment
 
LVL 16

Accepted Solution

by:
Easwaran Paramasivam earned 500 total points
ID: 36716623
Yes. Its possible. Refer: http://www.tek-tips.com/faqs.cfm?fid=4372

The url of the hyperlink field can be assigned from the Site filed of your result.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

770 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