asp.net - How to get ItemTemplate Property -
i want value of generated html of itemtemplate in gridview
<asp:templatefield headertext="mark"> <itemtemplate> <input type="text" value="<%# eval("mark") %>" /> </itemtemplate> </asp:templatefield>
i try :
gridview1.rows[i].cells[5].controls[0]
you have use asp.net server control value in end.
asp.net
<asp:templatefield headertext="نمره"> <itemtemplate> <asp:textbox id="tbmark" runat="server" text='<%# eval("mark") %>'></asp:textbox> </itemtemplate> </asp:templatefield>
c#
string mark = (gridview1.rows[i].cells[5].controls[0] textbox).text;
Comments
Post a Comment