your gridview in .aspx file
<%
<asp:GridView ID="DataGrid1" HeaderStyle-CssClass="fixedHeader" EmptyDataText="No Matching Job Found"
runat="server" OnPageIndexChanged="datagrid_page" AllowPaging="True"
PageSize="20" AutoGenerateColumns="False"
Width="875px" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None"
BorderWidth="1px" CellPadding="3" GridLines="Horizontal" Font-Names="Verdana" Font-Size="Small"
onpageindexchanging="DataGrid1_PageIndexChanging">
<HeaderStyle BackColor="Gray" BorderColor="LavenderBlush" BorderStyle="None" Font-Bold="True"
Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False"
ForeColor="White" Borderwidth="1px" Font-Names="Verdana" Font-Size="Small" />
<RowStyle CssClass="rowstyle" BackColor="White" />
<Columns>
<asp:HyperLinkField DataNavigateUrlFields="CODE" DataNavigateUrlFormatString="jobdetail.aspx?code={0}" DataTextField="code" HeaderText="JOB CODE">
<ItemStyle BackColor="ActiveCaptionText" CssClass="" ForeColor="ControlDarkDark" HorizontalAlign="Center" />
</asp:HyperLinkField>
<asp:BoundField DataField="location" HeaderText="LOCATION" >
</asp:BoundField>
<asp:TemplateField HeaderText="EXPERIENCE">
<ItemTemplate >
<asp:Label BackColor="ActiveCaptionText" ForeColor="ControlDarkDark" runat="server" Text='<%# string.Format( "{0} to {1} Years", DataBinder.Eval(Container, "DataItem.expfrom"), DataBinder.Eval(Container, "DataItem.expto") ) %>' ID="Label1">
</asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="title" HeaderText="TITLE">
</asp:BoundField>
<asp:BoundField DataField="Industry" HeaderText="INDUSTRY">
</asp:BoundField>
</Columns>
<PagerStyle BackColor="Silver" HorizontalAlign="Center" />
</asp:GridView>
in the above i have used hyperlinkfield in which im using DataNavigateUrlFormatString properties to pass query string to other page............ Plz understand this hyperlink field properly i think you will get your answer..........
Regards,
Vikash Pathak
kallamjreddy-17301, if this helps please login to Mark As Answer. | Alert Moderator