An ASP.NET Blog
I work for Microsoft and help people and businesses make better use of technolgy to realize their full potential. The opinions mentioned herein are solely mine and do not reflect those of my employer.

Getting the IE Webcontrols work in ASP.NET 2.0 while using Visual Studio 2005

Tuesday, February 21, 2006 5:28 AM
Visual Studio 2005 introduced a new model for developing ASP.NET Applications without requiring an IIS on the development machine. (In fact it has been for some time with WebMatrix, Cassini Webserver etc., but this is the full fledged Visual Studio Product that has come out with this feature).

When we create an ASP.NET application using Visual Studio 2005 and try to run the application, we can momentarily notice the small Icon that comes in the Right bottom corner of the system. It is actually the built-in webserver used for running ASP.NET Applications locally.

Though the usage of this is limited to local system, it can be very useful for development scenarios where you dont need to have IIS installed for developing web applications.

Having said that, the link between IIS Virtual directory and your web application is cut off and you can create the application even in your file system folder (not the conventional c:\inetpub\wwwroot) and get ASP.NET Web applications Run / Debugged in your machine.

If we would like to use the IE Webcontrols which we have been quite familiar with, working in the ASP.NET 1.x versions, we need to customize a little bit to get them working. The webctrl_client folder which contains the scripts and images for the IE Webcontrols to render had to be present in the c:\inetpub\wwwroot folder in traditional ASP.NET 1.x applications.

Here, the folder needs to be part of the root directory of your application. Say, we have an application in c:\MyWebsites\MyTestApplication. Then the webctrl_client folders needs to be inside the MyTestApplication folder.

Secondly, we need to specify this setting in the web.config, as follows:-

<configSections>
<section name="MicrosoftWebControls" type="System.Configuration.NameValueSectionHandler,System,Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</configSections>

<MicrosoftWebControls>
<add key="CommonFiles" value="/MyTestApplication/webctrl_client/1_0/"/>
</MicrosoftWebControls>

The above settings go within the <configuration> </configuration> section of the web.config.

Please note that this setting is not required, if we create a virtual directory in the IIS for our application and the webctrl_client folder is already a part of c:\inetpub\wwwroot folder.

This is required only if we use the Visual Studio's built-in web server which uses localhost:PortNumber for running locally and debugging.

Also, its worth to note that there are better equivalent controls in ASP.NET 2.0 for the IE Webcontrols such as the ASP.NET 2.0 TreeView, MultiView controls which have better performance than the IE Webcontrols.

In fact, for TreeView, its better to use the ASP.NET 2.0 TreeView control rather than the IE Webcontrols TreeView.

The Tabstrip is the only thing for which you may want to continue with the IE Webcontrols where you can specify AutoPostBack="false" and thereby, avoid postback when hopping between the Tabs.

Cheers and Happy Programming !!!

Feedback

# re: Getting the IE Webcontrols work in ASP.NET 2.0 while using Visual Studio 2005

Do you know how this would translate to Visual Web Developer 2005 Express? I added the configSections part but receive the following error when adding the MicrosoftWebControls part to the web.config file:
Could not find schema information for the element 'MicrosoftWebcontrols'
3/24/2006 7:06 PM | anonymous

# re: Getting the IE Webcontrols work in ASP.NET 2.0 while using Visual Studio 2005

Following this example, I am also getting the error message "Could not find schema information for the element 'MicrosoftWebcontrols'". This is of course the only page hit on Google for this problem, so I'm hoping someone has found a solution. 8/3/2006 1:59 PM | Trevor

# re: Getting the IE Webcontrols work in ASP.NET 2.0 while using Visual Studio 2005

Hi harish,

thanks for these information but it doesn't work in my project. its gives errror if i add these settings in weconfig. and if i made virtual dir then it desn't show link on tab text. 9/7/2006 10:38 AM | manish jain

# re: Getting the IE Webcontrols work in ASP.NET 2.0 while using Visual Studio 2005

you can contact me on manish_jain161@rediffmail.com 9/7/2006 10:41 AM | manish jain

# re: Getting the IE Webcontrols work in ASP.NET 2.0 while using Visual Studio 2005

Brilliant! Thanks so much for this invaluable tip. 9/25/2006 6:41 AM | Brian Otten

# re: Getting the IE Webcontrols work in ASP.NET 2.0 while using Visual Studio 2005

Working! Thanks for such a valuable solution. 10/17/2006 10:17 AM | Girish

# re: Getting the IE Webcontrols work in ASP.NET 2.0 while using Visual Studio 2005

Thank You very much! Now it works. I wish, I had found this document a few hours earlier. :-) 1/15/2007 3:52 PM | DerMr

# re: Getting the IE Webcontrols work in ASP.NET 2.0 while using Visual Studio 2005

Thank You. Very valuable information buddy. 2/7/2007 3:07 AM | Kiran

# re: Getting the IE Webcontrols work in ASP.NET 2.0 while using Visual Studio 2005

I am still getting the error message "Could not find schema information for the element 'MicrosoftWebcontrols'". Can someone please pass me any possible solution? 1/2/2008 4:10 AM | Jake

# re: Getting the IE Webcontrols work in ASP.NET 2.0 while using Visual Studio 2005

Hi Harish,

This blog saved me so much time and effort! Thanks for posting this! 3/7/2008 5:10 AM | Brian

# re: Getting the IE Webcontrols work in ASP.NET 2.0 while using Visual Studio 2005

I did the same thing as instruction. my Tabstrip did not show at all. 4/28/2008 12:27 AM | Frances

# re: Getting the IE Webcontrols work in ASP.NET 2.0 while using Visual Studio 2005

I did the same thing as per instructions. But my Tabstrip didnot showed at all.
Please suggest.
Thanks
Sri 5/12/2008 7:36 AM | Sri

Post a comment





 

Please add 6 and 1 and type the answer here: