Riddhi Valecha

Riddhi Valecha

  • 441
  • 3.3k
  • 415k

DataList - Hyperlink - NavigateURL Property - IMP

Nov 26 2020 1:40 PM
Hello TEam,
 
I have a Datalist in aspx page.
 
My Requirement is -
1. First, Datalist is binded with records from datatable.
2. When user clicks on Hyperlink, it should navigate to new web form, with query string ID.
 
<asp:DataList ID="dtlist" DataKeyField="intfileid" runat="server" RepeatColumns="4" CellPadding="5" OnItemDataBound="dtlist_ItemDataBound" OnItemCommand="dtlist_ItemCommand">
<ItemTemplate>
<asp:HyperLink ID="HyperLink1" class="preview" runat="server" ToolTip='<%#Bind("varFilePath")%>' >
<asp:Image Width="100" ID="Image1" ImageUrl='<%# Bind("ImgURL") %>' runat="server" />
</asp:HyperLink>
</ItemTemplate>
<ItemStyle BorderColor="Brown" BorderStyle="dotted" BorderWidth="3px" HorizontalAlign="Center"
VerticalAlign="Bottom" />
</asp:DataList>
 

Answers (2)