后台获取 iframe 对象
<iframe id ="mainFrame" frameborder="0" scrolling="no" style="height: 580px; width: 700px; margin-left: 0px;">
</iframe>
public partial class Main : System.Web.UI.Page
{
protected static System.Web.UI.HtmlControls.HtmlContainerControl mainFrame;
protected void Page_Load(object sender, EventArgs e)
{
mainFrame = (HtmlContainerControl)this.FindControl("mainFrame");
}
………………。
总是提示mainFrame为空,求大神帮忙!