代码之家  ›  专栏  ›  技术社区  ›  thmsn

FindControl实现

  •  1
  • thmsn  · 技术社区  · 16 年前

    protected override Control FindControl(string id, int pathOffset)
    {
        return this;
    }
    

    1 回复  |  直到 11 年前
        1
  •  2
  •   Didier Ghys    13 年前

    protected override Control FindControl(string id, int pathOffset)
    {
        return this;
    }
    

    protected virtual Control FindControl(string id, int pathOffset)
    {
         string str;
         this.EnsureChildControls();
    if (!this.flags[0x80])
    {
         Control namingContainer = this.NamingContainer;
    if (namingContainer != null)
    {
        return namingContainer.FindControl(id, pathOffset);
    }
    

    额外阅读 MSDN

    pathOffset参数,有助于搜索。你不应该



    link

    推荐文章