Solved

repeater control Create hyperlink

Posted on 2011-02-15
2
495 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

687 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