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
199 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
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 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

809 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