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

posted @ Tuesday, February 21, 2006 5:28 AM

Print

Comments on this entry:

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

Left by anonymous at 3/24/2006 7:06 PM
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'

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

Left by Trevor at 8/3/2006 1:59 PM
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.

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

Left by manish jain at 9/7/2006 10:38 AM
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.

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

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

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

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

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

Left by Girish at 10/17/2006 10:17 AM
Gravatar
Working! Thanks for such a valuable solution.

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

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

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

Left by Kiran at 2/7/2007 3:07 AM
Gravatar
Thank You. Very valuable information buddy.

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

Left by Jake at 1/2/2008 4:10 AM
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?

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

Left by Brian at 3/7/2008 5:10 AM
Gravatar
Hi Harish,

This blog saved me so much time and effort! Thanks for posting this!

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

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

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

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

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

Left by Bill at 12/17/2008 9:04 PM
Gravatar
So what was the solution to:

could not find schema information for the element MicrosoftWebControls

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

Left by AJ at 1/3/2009 1:21 AM
Gravatar
Thank you very much ,The small change in Config working grate

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

Left by Knud at 1/3/2009 8:51 PM
Gravatar
What is the small change needed ind web.config to solve then problem "Could not find schema information for the element 'MicrosoftWebcontrols'".

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

Left by club penguin at 3/17/2009 5:58 PM
Gravatar
Thank You very much! Now it works.

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

Left by Brett Stinson at 6/2/2009 9:42 PM
Gravatar
Excellent article. Saved me a great deal of time.

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

Left by web development company at 8/28/2009 11:20 AM
Gravatar
Nice post,

Thank You. Very valuable information buddy.

Your comment:



 (will not be displayed)


 
 
 
 
 

Live Comment Preview:

 
«November»
SunMonTueWedThuFriSat
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345