Solved

using asp:HyperLinkField to pass querystring

Posted on 2011-09-28
1
246 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

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…
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…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

726 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