Microsoft.Web.UI.WebControls Treeview not rendering on some machines

匆匆过客 提交于 2019-12-04 15:41:43

Microsoft.Web.UI.WebControls.Treeview is an obsolete control.

The most likely reason why your tree control breaks is that it does not work on Windows 8/IE10.

Best option is to convert to System.Web.UI.WebControl.TreeView

Quick fix: add the following code to your Global.asax.vb.Application_EndRequest. This will force IE to load your application in compatibility mode.

Try

   Response.AddHeader("X-UA-Compatible", "IE=5")

Catch ex As Exception

End Try

You may also read this article on how to make sure your server recognizes IE10: http://www.hanselman.com/blog/BugAndFixASPNETFailsToDetectIE10CausingDoPostBackIsUndefinedJavaScriptErrorOrMaintainFF5ScrollbarPosition.aspx

More explanation: Microsoft removed support for HTC behavior files in IE10 (https://msdn.microsoft.com/en-us/library/hh801216(v=vs.85).aspx). HTCs was the old way of extending browser's capabilities. Microsoft TreeView uses HTCs (found in webctrl_client folder) with no fallback. Other browsers do still seem to support HTCs.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!