logo
  • 教程列表
  • SO官方文档
  • 按 ID 查找控件
    • 访问 aspx 中的 TextBox 控件
    • 在 GridView Repeater ListView 等中查找控件
  1. StackOverflow 文档
  2. ASP.NET 教程
  3. 按 ID 查找控件
  4. 在 GridView Repeater ListView 等中查找控件

在 GridView Repeater ListView 等中查找控件

Created: November-22, 2018

如果 Control 有行。

TextBox tb = GridView1.Rows[i].FindControl("TextBox1") as TextBox;

或者如果它有物品。

TextBox tb = Repeater1.Items[i].FindControl("TextBox1") as TextBox;
  • 访问 aspx 中的 TextBox 控件

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 关于我们
  • 免责声明