Visual Studio 2005 ASP.net new control on page does not register in code behind. 1.1 upgrade to 2.0

I have started working at a new place...

They have upgraded their code from 1.1 to 2.0.  

We are using Visual Studio 2005.

When I add a new control to a webpage, I double click on it to start codeing an event.  The code shows up, but the handles statement already shows an error like it doesn't know about this control.  I have tried saving, compiling etc....

My current work around is to add the control withevents to the top of the file, but I don't want to have to do this for every control I add.

Is there a way to fix this.  I have about 30 pages or more to work with.

Thanks,

LVL 8
Rog DManager Inforamtion SystemsAsked:
Who is Participating?
 
Rog DConnect With a Mentor Manager Inforamtion SystemsAuthor Commented:
Yes, I understand, but need to figure out a way around having to manually add the line myself.

That is the question,

Rog
0
 
Solar_FlareCommented:
I get this sometimes, when I do I go into the page.designer.vb file and add a line for the new control. VS then knows about the control from the code behind and will compile.
0
All Courses

From novice to tech pro — start learning today.