Monday, August 06, 2007 10:06 PM
While trying to AJAXify your ASP.NET 2.0 Applications, there are certain things you need to take care of, before being able to use ASP.NET AJAX Extensions in your existing pages.
One of the main things is to obviously get ASP.NET AJAX installed. You can get ASP.NET AJAX 1.0 from here.
Secondly you need to upgrade your existing ASP.NET 2.0 Application’s Web.Config file with the settings required for it to be able to understand ASP.NET AJAX. I had written a detailed step by step procedure in my earlier article on this.
Despite doing the above when you try to add ASP.NET AJAX Server Side controls like ScriptManager, UpdatePanel etc., and run the page, you might get the error “Element ‘ScriptManager’ is not a known element. This can occur if there is a compilation error in the Web Site“.
You might be seeing the red squiggly line under ScriptManager and similar ASP.NET AJAX Extension controls.
The reason might be that you havent installed Visual Studio 2005 Service Pack 1. The Visual Studio 2005 SP1 provides support for ASP.NET AJAX as well as couple of other things like Web Application Projects etc., You can find more about the Visual Studio 2005 SP1 features from my earlier article here.
Once you install Visual Studo 2005 SP1 you will notice that the ScriptManager and other ASP.NET AJAX Extensions are understood by Visual Studio 2005 and doesnt show up the red squiggly or any errors.
In general it is better if you follow this order in AJAX enabling your existing ASP.NET 2.0 Applications
1. Install Visual Studio 2005 SP1. It can be installed from here.
2. Install ASP.NET AJAX
3. Install ASP.NET AJAX Control Toolkit (Optional)
4. Upgrade your existing ASP.NET 2.0 Application’s Web.Config file. Detailed steps here.
5. Start AJAX Enabling different sections of your site based on requirements and design.
Hope this helps.