R8VI
asked on
Itemdatabound, hyperlink asp.net, c#
Hi,
I have a datalist which is as so
<asp:DataList ID="dlPaging" runat="server" OnItemCreated="dlPaging_It emCreated" RepeatDirection="vertical"
CellPadding="3" CellSpacing="3" ItemDataBound="dlpaging_Da tabound">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text=""></asp:Label>
<asp:HyperLink ID="hprComments" runat="server">Comments</a sp:HyperLi nk>
</ItemTemplate>
</asp:DataList>
and then the back end code
protected void dlpaging_Databound(object sender, DataListItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.AlternatingIt em | e.Item.ItemType == ListItemType.Item)
{
HyperLink hyperlink = (HyperLink)e.Item.FindCont rol("hprCo mments");
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
Thanks
R8VI
I have a datalist which is as so
<asp:DataList ID="dlPaging" runat="server" OnItemCreated="dlPaging_It
CellPadding="3" CellSpacing="3" ItemDataBound="dlpaging_Da
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text=""></asp:Label>
<asp:HyperLink ID="hprComments" runat="server">Comments</a
</ItemTemplate>
</asp:DataList>
and then the back end code
protected void dlpaging_Databound(object sender, DataListItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.AlternatingIt
{
HyperLink hyperlink = (HyperLink)e.Item.FindCont
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
Thanks
R8VI
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.