Code for Gridview in ASP.Net <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" HeaderText="Absolute"> <Columns> <asp:BoundField DataField="Sno" HeaderText="Sno" SortExpression="Sno" /> <asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" /> <asp:BoundField DataField="Typeofauction" HeaderText="Typeofauction" SortExpression="Typeofauction" /> <asp:BoundField DataField="Price" HeaderText="Price" SortExpression="Price" /> <asp:BoundField DataField="PostedDate" HeaderText="PostedDate" SortExpression="PostedDate" DataFormatString="{0: dd MMM yyyy}" /> <asp:BoundField DataField="StartProcess" HeaderText="StartProcess" SortExpression="StartProcess" /> <asp:BoundField DataField="EndProcess" HeaderText="EndProcess" SortExpression="EndProcess" /> <asp:TemplateField HeaderText="CoverImage" SortExpression="CoverImage"> <EditItemTemplate> <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("CoverImage") %>'></asp:TextBox> </EditItemTemplate> <ItemTemplate> <asp:Image ID="Image2" runat="server" Height="128px" ImageUrl='<%# Eval("CoverImage") %>' Width="219px" /> </ItemTemplate> </asp:TemplateField> <asp:HyperLinkField HeaderText="Bid Here" NavigateUrl="~/Bid.aspx" Text="Bid Now" /> <asp:HyperLinkField HeaderText="View Details" Text="View Details" NavigateUrl="~/Buy.aspx" /> </Columns> <EmptyDataTemplate> <asp:Image ID="Image1" runat="server" Height="138px" Width="213px" /> </EmptyDataTemplate> </asp:GridView>
<asp:HyperLinkField HeaderText="View Details" Text="View Details" DataNavigateUrlFields="Sno" DataNavigateUrlFormatString="~/Buy.aspx?sno={0}" />
Request.QueryString
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)