Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在按钮单击事件上访问页脚文本框的值(按钮在 Gridview 之外)......页脚文本框在动态 GridView 中动态生成......页脚文本框可能非常依赖于表中的列
如果你给你的文本框提供了 id,你可以在你的 button_click 处理程序中使用下面的代码来访问它们。
TextBox txt = (TextBox) this.GridView1.FooterRow.FindControl("textbox1");