Solved

using asp:HyperLinkField to pass querystring

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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

759 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

19 Experts available now in Live!

Get 1:1 Help Now