asp classic - Templatefield in gridview -


how can values stored in 1 column of gridview? code:

<asp:templatefield headertext="document code" headerstyle-backcolor="#000099" headerstyle-width="150px">                     <itemtemplate>                         <asp:linkbutton runat="server" id="doc_code" text='<%# eval("doc_code")%>' commandargument='<%#eval("doc_id") %>'                             oncommand="editdocument" causesvalidation="false">                             <span class='glyphicon glyphicon-remove'></span>                                   </asp:linkbutton>                     </itemtemplate>                 </asp:templatefield> 

i blank value column dont know how values. please help. thanks

use bind in place of eval shown in below solution.

 <asp:linkbutton runat="server" id="doc_code" text='<%# bind("doc_code")%>' commandargument='<%# bind("doc_id") %>' oncommand="editdocument" causesvalidation="false"> 

Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -