views:

244

answers:

3

It's been a while since I've created a new ASP.NET web application. (I've been doing ASP.NET MVC for the last 9 months, and hadn't done an ASP.NET site for about a year before that.) Now I've created a new regular ASP.NET app and when I look at the Default.aspx file, Visual Studio is only displaying the HTML tab in the Toolbox. I don't have the WebControls or the data access controls. (I don't even remember what other tabs I should be seeing.)

When I try to add a web control manually like this,

<asp:Label id="LabelTest" runat="server"></asp:Label>

I get a green squiggly and the tool tip says Unrecognized namespace 'asp'.

What do I need to do to get the Web Controls in my toolbox and also get the namespace to be recognized?

I've got this line in my page load event:

LabelTest.Text = "testing"

My app compiles and runs as expected -- the label displays testing.

So, I could word around it, but this will just make designing the forms more difficult.

Update: I've tried all 3 of the suggestions posted as answers so far and nothing has helped. Now I'm seeing a different error in addition to what I was getting before. In the designer I now see this:

Error Creating Control - LabelTest

Could not load file or assembly 'Microsoft.Web.Authoring' or one of its dependencies. The system cannot find the file specified.

A: 

Have you tried

  1. removing and then re-adding the assembly references and then
  2. rebuilding the solution?
Ropstah
OK, tried that also, but it didn't help.
Dennis Palmer
A: 
chakrit
Yes, I tried that, but it didn't help.
Dennis Palmer
+1  A: 

Have you tried repairing the Visual Studio installation?

Pops-in the disc and select "Repair"?

If that doesn't work, then I think you should just re-install Visual Studio... It seems like a plugins/add-on corrupted the toolbox

chakrit
Well, something serious must be wrong with my machine because when I try that I get "A problem has been encountered while loading the setup components. Canceling setup." :(
Dennis Palmer
I double clicked on Visual Studio 2008 in Programs and Features and it launched the repair, which is running now...
Dennis Palmer
Nope, that still didn't help.
Dennis Palmer
@Dennis Palmer I think you should just re-install Visual Studio... It seems like you have some plugins/addons that corrupts the toolbox
chakrit
Accepted answer for re-install comment.
Dennis Palmer