Search code examples
asp.netupdatepaneldotnetnuke

ASP.NET UpdatePanel library reference errors


I am having a problem with VS 2010 apparently losing it's ability to load an UpdatePanel in the middle of development and it is driving me crazy. I am using VS2010 and building a user control with .NET 3.5, targeting DNN 5.x.

I have created a control to be used on a DNN website that utilizes an update panel. When I develop the control by FTPing to the website and developing on it, everything works just fine. I decided to move development to a local copy of DNN and create a web application project for the control. Everything was working just fine at first. After a few builds, I started to receive the following errors:

The type or namespace name 'UpdateProgress' does not exist in the namespace 'System.Web.UI.WebControls.WebParts' (are you missing an assembly reference?)

The type or namespace name 'UpdatePanel' does not exist in the namespace 'System.Web.UI.WebControls.WebParts' (are you missing an assembly reference?)

I figured I had messed something up along the way and screwed up a reference to the libraries, so I unloaded everything and reloaded the library references. I continued to get the error and could not compile the control. Finally, I decided to redo the entire project and import the code I had already written. Everything was working just fine until a few builds later when the same error popped up.

I followed all of the same steps, unloading the references, reloading them, and finally deleting the project. Each time I create a new project, and copy the exact same code into the .ascx files, they work just fine...for a few builds. Last night, I compiled the library and tested the changes. Everything was great so I closed the project and turned off the machine. Turned it on this morning and received the build errors. It is like I have a ticking timebomb in my computer that just shuts these things off.

Any ideas on what I am missing that might be causing this? I don't know why a library would flicker on and off like this. I have yet to run into this sort of a problem with any other project on my local machine and I really don't want to develop this through FTPing to the website, again. Bleh!


Solution

  • My solution got into this weird state too. It occurred after editing conflicts in the web-config after getting latest using AnkhSVN. The error only showed in the page I had open in Visual Studio at the time. It said it could no longer locate the UpdatePanel or UpdateProgress in System.Web.UI, which didn't make sense because I use these controls in my other pages.

    The Fix:
    Simply drag and drop an UpdatePanel from the toolbox onto the page throwing the error. Clean and Rebuild and you're good to go. All you have left to do is remove the UpdatePanel you just added.
    I believe doing this re-wires things in the solution that I couldn't see.