0

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.

3 Answers 3

1

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

Sign up to request clarification or add additional context in comments.

5 Comments

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." :(
I double clicked on Visual Studio 2008 in Programs and Features and it launched the repair, which is running now...
Nope, that still didn't help.
@Dennis Palmer I think you should just re-install Visual Studio... It seems like you have some plugins/addons that corrupts the toolbox
Accepted answer for re-install comment.
0

Have you tried

  1. removing and then re-adding the assembly references and then
  2. rebuilding the solution?

Comments

0

Have you tried the "Reset Toolbox" command?

reset toolbox http://chakrit.net/files/stackoverflow/so_reset_toolbox.png

...

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.