Sometimes that works – most times it won’t, but it’s worth a try. Next, if the above fails, right click on the ASPX page in the Solution Explorer and select Convert To Web Application.One of two things will happen here (at least for me).
For example I have a nearly standard header that I use on some pages that contain common toolbar buttons.It’d be really nice if the designer/markup editor could throw this or a similar dialog up for you when it can’t create the .designer file, natch – it requires the explicit Convert To Web Application option after you’ve nuked the designer file.BTW, if you get the General Exception Failure dialog you may not be completely screwed either.The problem here is that this is difficult to figure out. You see the error – the compiler is missing the controls – but you get no hint as to why the codebehind page is not behing generated.When I run into this problem I usually start by deleting the .page and hoping that then opening the page in the visual designer and saving will fix any nascent problems.
If you just use the designer to create new pages it’s unlikely that the WAP codebehind generation will get munged up.