Enable AJAX on Existing ASP.NET Website Using WCSF

Enable AJAX on Existing ASP.NET Website Using WCSF

by David Hayden ( Microsoft MVP C# ), Filed: ASP.NET 2.0

 

Enabling AJAX on an existing ASP.NET Website involves the monotonous task of adding various Web.config settings. If you have a relatively empty Web.config file, it is probably easiest to just copy a Web.config file with existing AJAX settings and merge the existing application's Web.config settings into it. Unfortunately, I had just the opposite case today. I had a really complex existing Web.config file and did not want to take the chance of screwing up the merge by copying over existing settings.

Then out of nowhere I had a flash of brilliance that practically knocked me out of my chair. The new version of the Web Client Software Factory has a recipe, called Enable AJAX, that will add the AJAX configuration settings in an existing Web.config file. I wasn't using WCSF on the project, but it would only take two seconds to enable WCSF on the project, run the Enable AJAX recipe on the project to add the AJAX configuration settings, and disable WCSF on the project. So that is what I did :)

I can't show the project I am working on, but here is the recipe as show on my PnPGuidance Website:

 

Enable AJAX on Existing ASP.NET Website

 

The Enable AJAX Recipe in WCSF worked like a charm, but that didn't keep me from checking in all the previous changes to source code before doing it :)

Kudos to the Patterns & Practices Team for adding that wonderful new recipe in WCSF v2.0!!!! It didn't seem like a big deal at the time, but it is very handy ;)

 

News Feed: David Hayden ( Microsoft MVP C# )

Filed: ASP.NET 2.0

posted on Friday, November 16, 2007 7:09 PM

My Links

Post Categories

Article Categories

Archives

Loose-Leaf Tea