<form id="form1" runat="server"> <div> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" OnRowCommand="GridView1_RowCommand"> <Columns> <asp:BoundField HeaderText="ID" DataField="AdvID" /> <asp:BoundField HeaderText="Name" DataField="Name" /> <asp:BoundField HeaderText="Item" DataField="Item" /> <asp:ImageField HeaderText="Image" DataImageUrlField="ImgPath" ControlStyle-Height="120" ControlStyle-Width="140"> <ControlStyle Height="120px" Width="140px"></ControlStyle> </asp:ImageField> <asp:TemplateField HeaderText="View Information"> <ItemTemplate> <asp:LinkButton ID="lnkView" runat="server" CommandArgument='<%#Eval("AdvID") %>' OnClick="lnk_OnClick">View</asp:LinkButton> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="DownloadLink"> <ItemTemplate> <asp:Button ID="lnkDownload" runat="server" Text="Download" OnClick="DownloadFile" CommandArgument='<%# Eval("AdvID") %>' ></asp:Button> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> <asp:Button ID="btnDownload" runat="server" Text="Download" OnClick="lnk_OnClick" />
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)