[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to make Gridview Item Template field an href

Posted on 2007-08-01
3
Medium Priority
?
1,698 Views
Last Modified: 2007-08-01
How might I make a Gridview item template field into an href?

I've got the template editor open, and I'm looking at the [Label5] control in the template...I can't figure out how to wrap the

<a href = '  (label content) '> (label content) </a>

around it.

Any help with this would be appreciated.

Thanks!
0
Comment
Question by:codequest
3 Comments
 
LVL 14

Assisted Solution

by:chinu1310
chinu1310 earned 760 total points
ID: 19610377
0
 
LVL 9

Accepted Solution

by:
noulouk earned 1240 total points
ID: 19610387
Hi codequest,

Try:
<ItemTemplate>
    <a href="<%# DataBinder.Eval(Container.DataItem, "URL") %>">
      <%# DataBinder.Eval(Container.DataItem, "Name") %></a>
  </ItemTemplate>

Hope this helps.
0
 
LVL 2

Author Comment

by:codequest
ID: 19613122
chinu1310's was interesting, but a different syntax than I'm used to.  I went with noulouk's and it worked good.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
I have developed many web applications with asp & asp.net and to add and use a dropdownlist was always a very simple task, but with the new asp.net, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
Integration Management Part 2
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month18 days, 23 hours left to enroll

834 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