Friday 14 October 2011

Using Hyperlink in a DataList and firing the event

<asp:DataList ID="dlst" runat="server" DataKeyField="pid" DataSourceID="SDS">
            <ItemTemplate>
            <asp:Label ID="Label" runat="server" Text='<%# Eval("pid") %>' />
            <asp:HyperLink ID="hlnk" NavigateUrl='<%# string.Format("../demo.aspx?val={0}", Eval("pid")) %>' Text="Click Me" runat="server" />
            </ItemTemplate>
         </asp:DataList>

No comments:

Post a Comment