How can I access an IFRAME from the codebehind file in ASP.NET?

后端 未结 10 1698
隐瞒了意图╮
隐瞒了意图╮ 2020-12-14 07:09

I am trying to set attributes for an IFRAME html control from the code-behind aspx.cs file.

I came across a post that says you can use FindControl to find the non-as

10条回答
  •  天涯浪人
    2020-12-14 07:42

    Try this.

    ContentPlaceHolder cplHolder = (ContentPlaceHolder)this.CurrentMaster.FindControl("contentMain");

    HtmlControl cpanel= (HtmlControl)cplHolder.FindControl("contentPanel1");

提交回复
热议问题