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

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -