c# - Hidden field value in GridView -
how hidden column's value in gridview in asp.net?
firstly in grid view select column , make template column this:
<asp:template field header text="savingid" visible="false"> <itemtemplate> <asp:label id = "lblsavingid" runat="server" text ='<%#bind(savingid")%>' /> </itemtemplate> </asp:templatefield>
after on coding side can fetch value as:
string id= (gridview1.rows[i].findcontrol("lblsavingid") label).text;
Comments
Post a Comment