如何在GridView中绑定Textbox值 [英] How to bind the Textbox value in GridView
本文介绍了如何在GridView中绑定Textbox值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个占位符。在该文本框中动态生成。我必须将文本框的值放在GridView列中并在数据库中更新。如何将动态生成的文本框绑定到网格视图
解决方案
尝试这个:
< asp:textbox id = txtName enabled = false runat = < span class =code-string> server> Text = ' < span class =code-string><%#Eval( YourFieldName )%>' > < / asp:textbox >
I have a Place holder. In that Text boxes are Dynamically generated. I have to put the Value of the Text Boxes in a GridView Column and update that in database.How will i bind the textboxes dynamically generated to a grid view
解决方案
try this:
<asp:textbox id="txtName" enabled="false" runat="server" >Text='<%# Eval("YourFieldName") %>'></asp:textbox>
这篇关于如何在GridView中绑定Textbox值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文