Visual Studio 2005/2008 IDE: Web Controls in the Toolbox seen grayed out for Asp.Net projects ?
Here is a quick post that may help you save few hours if you get into this problem.
Symptoms
-- Out of blue you realize that when you try to create and open a new Web site/Web Application project we do not see any of the Web controls in the Toolbox. It includes most of the sections in the Toolbox pane including Common controls, Data, Login, validation and in fact any of the controls which are associated with an Asp.Net web page.
-- When you click on 'Show All' in the toolbox you see all the Asp.Net related controls grayed out. In fact you will see most if not all, of the sections in the toolbox being grayed out except HTML controls.
Go to the Source view for the Web form in the VS IDE and add an ASP control yourself like <asp:TextBox...></asp:TextBox>
Browsing to the web page shows the control getting rendered without any issues. So seems like more of a VS IDE issue than anything to do with ASP.Net application configuration.
-- Creating a new Winform project works fine with all the relevant controls being displayed and working in the Toolbox window.
Resolution
This issue may happen if by mistake you had associated ASPX pages with the HTML Editor in the VS IDE. It should be ideally associated with the Web form Editor.
To resolve this, In the Solution Explorer, locate the ASPX that we are working on, right click on the page and select 'Open with...'.
You may be seeing that the current selection is HTML Editor (Default). Change it Web Form Editor and click on 'Set as Default'.
Close the current VS IDE and re-launch it and now we should *hopefully* be good.
Comments
Anonymous
April 22, 2009
PingBack from http://www.anith.com/?p=31596Anonymous
August 06, 2009
Excellent! It worked! Thanks so much!Anonymous
April 10, 2010
Muchas gracias, se resolvio el problemaAnonymous
September 16, 2011
No. It does not work. Please help