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

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -