Certain controls in an ASP.NET 2.0 aspx are not picked up in the Intellisense list. Attempting to reference them anyway in the code causes a build error "does not exist in the current context." and using FindControl does not find the control (example: Button button = (Button) FindControl("Button2"); ).
The control has an id attribute and runat="server" (example: ). It resides in a FormView's EditItemTemplate (FormView is also runat="server").
Interestingly enough, other controls in the aspx are available through Intellisense. They happen to reside in a separate FormView's EditItemTemplate. I can reference them in the code and build successfully.
I have not found any troubleshooting tips for this error, but I do remember that .NET 1.1 code behind featured an some auto-generated code that declared the controls. Does this exist in 2.0 and can I therefore resolve the problem by adding a declaration?
Thanks.
...
Go to the complete details ...