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 之外有一个搜索按钮,当用户单击搜索时,我需要通过相应列的 texbox 值过滤 gridview 的数据。
尝试这个
TextBox textBox = (TextBox)gridView1.HeaderRow.FindControl("contorlId");
在列中专门搜索通过索引识别单元格
TextBox textBox = (TextBox)gridView1.HeaderRow.Cells[0].FindControl("contorlId");