[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How can I create hyperlink in a datalist control in asp.net   ?

Posted on 2008-06-16
1
Medium Priority
?
1,482 Views
Last Modified: 2013-11-07
How can i create a hyperlink to the image in the following datalist   ? thanks


<body>
    <form id="form1" runat="server">
    <div>
       <asp:AccessDataSource ID="AccessDataSource1" runat="server"  DataFile="~/images.mdb"
            SelectCommand="SELECT [ID], [Name], [L] FROM [images]"></asp:AccessDataSource>
        <asp:DataList ID="DataList1" runat="server"   RepeatColumns="5"  DataKeyField="ID" DataSourceID="AccessDataSource1">
            <ItemTemplate>
             
               <asp:Label ID="IDLabel" runat="server" Text='<%# Eval("ID") %>'></asp:Label><br />
               <asp:Label ID="NameLabel" runat="server" Text='<%# Eval("Name") %>'></asp:Label><br />
               <asp:Image ID="Image1" runat="server" ImageUrl='<%# Eval("L") %>' /><br />
               <asp:Button ID="Button1" runat="server" Text="Button" />
                <br />                                
            </ItemTemplate>
        </asp:DataList></div>
       
    </form>
</body>
0
Comment
Question by:ernartey
[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
1 Comment
 
LVL 14

Accepted Solution

by:
ajitha75 earned 2000 total points
ID: 21799326
Instead of Image control use Hyperlink control as below

<asp:Hyperlink id="linkToPage" ImageUrl='<%# Eval("L") %>' runat="server" NavigateUrl="Default.aspx"></asp:Hyperlink>
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

649 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