Question

We have a simple web page which displays a treeview ( Microsoft.Web.UI.WebControls )

correctly rendered

Now, on some machines (mainly the clients ones ;-) ) the treeview isn't rendered properly :

not correctly rendered

I've tested this on all my machines, even linux, and everything is rendered correctly here. I can reproduce this error though by removing or renaming the 'webctrl_client' folder.

I don't understand however what this problem can be? The 'webctrl_client' folder is correctly installed in the root www folder, and the .dll is also properly placed? I tried clearing the browsers cache but that doesn't seem to have any effect either ....

Doen anyone have any idea what could be going on?

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top