https://docs.microsoft.com/en-us/dotnet/api/system.web.ui.control.findcontrol?view=netframework-4.7

FindControl(String)

Searches the current naming container for a server control with the specified id parameter.

public virtual System.Web.UI.Control FindControl (string id);
Parameters
id
String

The identifier for the control to be found.

Returns

The specified control, or null if the specified control does not exist.

Remarks

Use FindControl to access a control from a function in a code-behind page, to access a control that is inside another container, or in other circumstances where the target control is not directly accessible to the caller.

This method will find a control only if the control is directly contained by the specified container; that is, the method does not search throughout a hierarchy of controls within controls.

For information about how to find a control when you do not know its immediate最接近的 container, see How to: Access Server Controls by ID.

Docs-->.NET-->API reference-->System.​Web.​UI-->Control-->Methods-->Find​Control的更多相关文章

  1. System.Web.UI.WebControls.FileUpload.cs

    ylbtech-System.Web.UI.WebControls.FileUpload.cs 1. 程序集 System.Web, Version=4.0.0.0, Culture=neutral, ...

  2. 'DataVisualization' does not exist in the namespace 'System.Web.UI'一例解决办法

    之前项目是vs2010 aspx项目,用vs2017打开后,非运行状态下有一行错误:CS0234 C# The type or namespace name 'DataVisualization' d ...

  3. System.Web.UI.Page的页面基类

    服务器端的page类 所有我们编写的页面都继承自page类,可见page类是非常重要的,page类提供了哪些功能,直接决定了我们的页面类可以继承什么功能,或者说,直接决定了我们的页面类功能的强大与否! ...

  4. 继承System.Web.UI.Page的页面基类

    服务器端的page类      所有我们编写的页面都继承自page类,可见page类是非常重要的,page类提供了哪些功能,直接决定了我们的页面类可以继承什么功能,或者说,直接决定了我们的页面类功能的 ...

  5. foreach statement cannot operate on variables of type 'System.Web.UI.WebControls.Table' because 'System.Web.UI.WebControls.Table' does not contain a public definition for 'GetEnumerator'

    错误:foreach statement cannot operate on variables of type 'System.Web.UI.WebControls.Table' because ' ...

  6. 非静态的字段、方法或属性“System.Web.UI.Page.ClientScript...”要求对象引用 (封装注册脚本)

    在写项目时想对asp.net的注册前台脚本事件进行封装,就添加了一个BasePage.cs页面,但一直报错‘非静态的字段.方法或属性“System.Web.UI.Page.ClientScript.. ...

  7. “System.Web.UI.WebControls.Literal”不允许使用子控件

    今天在写下面的代码时遭遇错误——“System.Web.UI.WebControls.Literal”不允许使用子控件('System.Web.UI.WebControls.Literal' does ...

  8. System.Web.UI.ScriptManager.RegisterStartupScript(语句末尾加分号,不然可能会造成语句不执行)

    System.Web.UI.ScriptManager.RegisterStartupScript(this.Page, this.GetType(), "testKey", &q ...

  9. 解决类型“System.Web.UI.UpdatePanel”不具有名为“Gridview”的公共属性,

    类型“system.web.ui.updatepanel” 不具有名为“XXX”的公共属性,其实原因很简单.就是少了一个<ContentTemplate></ContentTempl ...

  10. 无法将类型“ASP.login_aspx”转换为“System.Web.UI.WebControls.Login”

    今天碰上了一个很傻的问题,起码我认为是这样. 项目中首页名是:Login.aspx,编译.运行都没有出现问题. 于是打包发布网站,各项内容都配置好后,问题出现了.一运行首页面就出现下面这个错误: 编译 ...

随机推荐

  1. 如何让alertdialog选择完后自动关闭

    builder.setIcon(R.drawable.ic_system) .setTitle("串口号") .setSingleChoiceItems(mPorts, mSele ...

  2. P1452 Beauty Contes(旋转卡壳版)

    题目背景 此处省略1W字^ ^ 题目描述 贝茜在牛的选美比赛中赢得了冠军”牛世界小姐”.因此,贝西会参观N(2 < = N < = 50000)个农场来传播善意.世界将被表示成一个二维平面 ...

  3. ByteArray的操作总结(复制、打印、位运算)

    1. 字节数组的复制 Method A:Array.Clone() Clone返回的是Object对象,需要强类型转换:Clone会创建一个新的对象,并将value赋给dec ]; ]; dst = ...

  4. vue computed自动计算

    <!DOCTYPE html> <html> <head> <title>vue</title> <meta charset=&quo ...

  5. unbuntu禁用ipv6

    ubuntu禁用ipv6cat /proc/sys/net/ipv6/conf/all/disable_ipv6 显示0说明ipv6开启,1说明关闭 在 /etc/sysctl.conf 增加下面几行 ...

  6. webpack简短版零工程构建项目(二)

    webpack使用总结 1.初始化一个项目 npm init -y 之后会生成一个package.json配置文件. 2.安装webpack,vue,vue-loader npm install we ...

  7. Windows 10 计划带来颜文字和Sandbox

    在最新的 Window 10 测试版 Build 18305 中,Windows 10 增加了对颜文字(kaomoji)的支持. Kaomoji 是由日本符号序列组成的面脸部表情的名称.虽然有些人,比 ...

  8. screen---管理会话

    Screen是一款由GNU计划开发的用于命令行终端切换的自由软件.用户可以通过该软件同时连接多个本地或远程的命令行会话,并在其间自由切换.GNU Screen可以看作是窗口管理器的命令行界面版本.它提 ...

  9. [SDOI2011]消防(树的直径)

    [SDOI2011]消防 题目描述 某个国家有n个城市,这n个城市中任意两个都连通且有唯一一条路径,每条连通两个城市的道路的长度为zi(zi<=1000). 这个国家的人对火焰有超越宇宙的热情, ...

  10. CSU 1510 Happy Robot

    1510: Happy Robot Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 19  Solved: 7 Description Input The ...