Amruta Kirdat

Amruta Kirdat

  • NA
  • 103
  • 34.2k

Gridview HyperLink

Mar 25 2011 7:44 AM
I have gridview which shows data from table and columns are Id and Name
when i click on Id it should select that id and pass it to same page for further processing...


below is code at .aspx

 <asp:GridView ID="dgvAllInfo" runat="server" AutoGenerateColumns = "False" Width="384px">
            <Columns>
<asp:HyperLinkField Text="ClientID" DataTextField= "ClientID" NavigateUrl="~/frmUpdate.aspx?id=WHAT SHOULD I WIRTE HERE"  />
<asp:BoundField DataField = "ClientId" />
                <asp:BoundField DataField = "ClientName" />

</Columns>
        </asp:GridView>

and for same pageload event i m fetching that id

int intId = conver.toint32(request.querystring["id"]);

but my question is i m unable to send that id... so how should i write that query string?



Answers (9)