从Framework 2.0-3.5 升级到Framework 4.5时遇到 Iframe 转换为服务器控件遇到不兼容问题
错误信息:
but its type (System.Web.UI.HtmlControls.HtmlIframe) is not compatible with the type of control (System.Web.UI.HtmlControls.HtmlGenericControl).
原因分析:
在.NET Framework 4.5 中, iframe的HTML 标记不再向HtmlGenericControl类的映射,需映射到System.Web.UI.HtmlControls.HtmlIframe
参考文档: