Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2008-10-09
2
Medium Priority
?
228 Views
Last Modified: 2013-11-26
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,

0
Comment
Question by:Rog D
2 Comments
 
LVL 15

Expert Comment

by:Solar_Flare
ID: 22681699
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
 
LVL 8

Accepted Solution

by:
Rog D earned 0 total points
ID: 22682133
Yes, I understand, but need to figure out a way around having to manually add the line myself.

That is the question,

Rog
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Integration Management Part 2

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question