Solved

repeater control Create hyperlink

Posted on 2011-02-15
2
489 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

861 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