troubleshooting Question

How to apply href tags around bound data in datagrid item template label

Avatar of jsvb1977
jsvb1977 asked on
ASP.NETASPMicrosoft SQL Server 2005
5 Comments1 Solution657 ViewsLast Modified:
I have an asp.net datagrid which displays data from a table. one of the fields in the table contains a link. I would like to learn how to turn that link into a clickable href when the datagrid renders the data in the browser.

See code snippet below:

Thank you,
Jason
<ItemTemplate>
                       <asp:Label ID="lblSDSolution" runat="server" Text='<%# Bind("SDSolution") %>' Width="250"></asp:Label>
                   </ItemTemplate>

'============================================
'SDSolution Data:

http://servicedesk.fsproduce.com:8080/AddSolution.do?solID=8406

'============================================
'When the data is displayed i would like:

<a href="http://servicedesk.fsproduce.com:8080/AddSolution.do?solID=8406" target="_blank">http://servicedesk.fsproduce.com:8080/AddSolution.do?solID=8406</a>

'==============================================
' Or maybe even consolidate the display so that the clickable link is something generic like this:

<a href="http://servicedesk.fsproduce.com:8080/AddSolution.do?solID=8406" target="_blank">SD Solution</a>
ASKER CERTIFIED SOLUTION
PaulHews

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros