Solved

repeater control Create hyperlink

Posted on 2011-02-15
2
483 Views
Last Modified: 2012-05-11
i have this as part of my repeater control:

<%#DataBinder.Eval(Container.DataItem, " Category_Name")%>

In reality, the value of category name needs by be a hyperlink with a URL simular to what is listed bellow.  Category_ID will be pulled in the same way i am getting category name. I am having a hard time putting this all together.

http://something.com/categories/catEdit.asp?Category_ID=1

0
Comment
Question by:vbnetcoder
2 Comments
 
LVL 16

Accepted Solution

by:
BurnieP earned 500 total points
ID: 34902292
Hi,

You could do it this way :

<a href=' <%# Eval("Category_Name", "http://something.com/categories/catEdit.asp?Category_ID={0}") %>'><%# Eval("Category_Name") %> </a>

or with <asp:HyperLink.. />

<asp:HyperLink ID="hyp" runat="server" NavigateUrl='<%# Eval("Category_Name", "http://something.com/categories/catEdit.asp?Category_ID={0}") %>'><%# Eval("Category_Name") %></asp:HyperLink>

0
 

Author Closing Comment

by:vbnetcoder
ID: 34902491
Thank you!
0

Featured Post

What Security Threats Are You Missing?

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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This video discusses moving either the default database or any database to a new volume.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

706 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