Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Itemdatabound, hyperlink asp.net, c#

Avatar of R8VI
R8VI asked on
.NET ProgrammingASP.NET
1 Comment1 Solution1022 ViewsLast Modified:
I have a datalist which is as so

   <asp:DataList ID="dlPaging" runat="server" OnItemCreated="dlPaging_ItemCreated" RepeatDirection="vertical"
        CellPadding="3" CellSpacing="3" ItemDataBound="dlpaging_Databound">
                     <asp:Label ID="Label1" runat="server" Text=""></asp:Label>
            <asp:HyperLink ID="hprComments" runat="server">Comments</asp:HyperLink>

and then the back end code

 protected void dlpaging_Databound(object sender, DataListItemEventArgs e)
        if (e.Item.ItemType == ListItemType.AlternatingItem | e.Item.ItemType == ListItemType.Item)
            HyperLink hyperlink = (HyperLink)e.Item.FindControl("hprComments");
            hyperlink.NavigateUrl = "default.aspx";


All i want it to do is to go to the default.aspx page but it will not make the hyper link clickable please help


Avatar of Irzana
IrzanaFlag of Sri Lanka image

Our community of experts have been thoroughly vetted for their expertise and industry experience.

This problem has been solved!
Unlock 1 Answer and 1 Comment.
See Answers