Solved

using asp:HyperLinkField to pass querystring

Posted on 2011-09-28
1
241 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

920 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now