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

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 !!!

Print | posted on Tuesday, February 21, 2006 5:28 AM

Comments on this post

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

Requesting Gravatar...
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'
Left by anonymous on Mar 24, 2006 7:06 PM

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

Requesting Gravatar...
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.
Left by Trevor on Aug 03, 2006 1:59 PM

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

Requesting Gravatar...
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.
Left by manish jain on Sep 07, 2006 10:38 AM

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

Requesting Gravatar...
you can contact me on manish_jain161@rediffmail.com
Left by manish jain on Sep 07, 2006 10:41 AM

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

Requesting Gravatar...
Brilliant! Thanks so much for this invaluable tip.
Left by Brian Otten on Sep 25, 2006 6:41 AM

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

Requesting Gravatar...
Working! Thanks for such a valuable solution.
Left by Girish on Oct 17, 2006 10:17 AM

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

Requesting Gravatar...
Thank You very much! Now it works. I wish, I had found this document a few hours earlier. :-)
Left by DerMr on Jan 15, 2007 3:52 PM

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

Requesting Gravatar...
Thank You. Very valuable information buddy.
Left by Kiran on Feb 07, 2007 3:07 AM

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

Requesting Gravatar...
I am still getting the error message "Could not find schema information for the element 'MicrosoftWebcontrols'". Can someone please pass me any possible solution?
Left by Jake on Jan 02, 2008 4:10 AM

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

Requesting Gravatar...
Hi Harish,

This blog saved me so much time and effort! Thanks for posting this!
Left by Brian on Mar 07, 2008 5:10 AM

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

Requesting Gravatar...
I did the same thing as instruction. my Tabstrip did not show at all.
Left by Frances on Apr 28, 2008 12:27 AM

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

Requesting Gravatar...
I did the same thing as per instructions. But my Tabstrip didnot showed at all.
Please suggest.
Thanks
Sri
Left by Sri on May 12, 2008 7:36 AM

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

Requesting Gravatar...
So what was the solution to:

could not find schema information for the element MicrosoftWebControls

Left by Bill on Dec 17, 2008 9:04 PM

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

Requesting Gravatar...
Thank you very much ,The small change in Config working grate
Left by AJ on Jan 03, 2009 1:21 AM

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

Requesting Gravatar...
What is the small change needed ind web.config to solve then problem "Could not find schema information for the element 'MicrosoftWebcontrols'".
Left by Knud on Jan 03, 2009 8:51 PM

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

Requesting Gravatar...
Excellent article. Saved me a great deal of time.
Left by Brett Stinson on Jun 02, 2009 9:42 PM

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

Requesting Gravatar...
Nice post,

Thank You. Very valuable information buddy.
Left by web development company on Aug 28, 2009 11:20 AM

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

Requesting Gravatar...
Just what I was looking for. Make sure to place the <configSections> code as the first child inside of the <configuration> section.
Left by gman on Aug 02, 2010 1:01 AM

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

Requesting Gravatar...
Thanks for this wonderfull tip!
This change in web.Config save me a lot of work.
Left by uauis on May 21, 2013 2:40 AM

Your comment:

 (will show your gravatar)