(Was: ASP.Net codebehind not finding controls on the web page)
I'm using VS 2008.
I don't know what secret switch I need to flip, or what trip wire I accidentally tripped over, but the last form I created in my project is misbehaving very seriously: the codebehind is apparently unable to find any of the controls that I have set up on the form. The codebehind file exists, but it generates compile errors on any references to the controls that are declared on the form.
The most obvious clue is that in the markup of the form, the first line is:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="UserSignature.aspx.vb"
Inherits="EEI_App.UserSignature" %>
and the Intellisense has underlined the whole first line, giving me some stupid "could not load file or assembly" message, that it can't find a completely unrelated DLL that is plainly and visibly in my app folder, with the reference correctly set up.
At first the Intellisense was only underlining the "CodeBehind" setting, saying "File UserSignature.aspx.vb was not found." - then for some reason it started with this other message about the DLL, also.
Every other form in my project is compiling and working fine, and there are no obvious differences between this form and any other form.
I have tried opening and closing Visual Studio; I have tried rebooting - nothing makes any difference. Every new form I add to my project cannot communicate with its own codebehind - from the moment of creating the new file, the markup gives me the "File 'NewFile.aspx.vb' was not found" error!
Any ideas?
Thanks
I think I'm closing in on the problem. @MatthewMartin, you are definitely warmest so far.
It appears that the form.aspx.designer.vb is not being refreshed for some reason when I drop controls onto the form. I still have no idea why this is, but at least we're getting warmer!
OK, this is definitely the problem now, and I've renamed the question to reflect this: the fundamental issue is that my form.aspx.designer.vb form is not being refreshed when I drop controls onto the form. Any ideas at least for a workaround - how to force the designer to refresh?
Thanks!