Monday, March 26, 2012

How do I enable .NET 2.0 & AJAX 1.0 in VS2008?

I have to build some applications with VS2008 thatstill target .NET 2.0 and AJAX 1.0 (what we have been using in VS2005). I have created the new project as a .NET 2.0 project, but can't see how to enable AJAX 1.0.

How is this done please? Step by step instructions would be ideal.


Thanks in advance.

In VS 2008, we do not have a separate project type for AJAX Enabled Web site

All you have do is add the

<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>

from now on, you can start using the other AJAX server controls just like you did in AJAX 1.0 Extensions for ASP .NET 2.0


Right, I have to target .NET 2.0 because our web farms are going to stay .NET 2.0 for the forseeable future... and they also have AJAX 1.0 installed. So I need to make sure that I can build .NET 2.0/AJAX 1.0 compatible websites in VS2008... particularly I'll be building a basic template that my team can use to get up and running on VS2008 quickly.

Adding a Script Managerisn'tgoing to add the necessary components to my .NET 2.0 project so AJAX 1.0 runs without any other tweaking on my part- is it?

As I understand it, what you suggest would actually be using whatever the new version of AJAX is (instead of AJAX 1.0)... correct?


Well, in VS2008 we do not have a separate template for AJAX enabled web site. All you have do is drag and drop the AJAX controls to your page. Your website will work just fine even if only targetted to 2.0 framework


So when I deploy the VS2008 .NET 2.0/AJAX site to our .NET 2.0/AJAX 1.0 servers, there won't be an issue?? This is one of those things that I need to verify before I start pushing out new project templates, etc.


Well, this is what Microsoft is calling it as "Target Framework" as one of the key feature of VS 2008

I am using VS2008 Professional and tested the target framework feature and it is quite impressive. I only tested in my local machine though.

Hope this helps


I think the best way to do this:

- install, vs2005, asp.net ajax extensions 1.0, and finally vs2008

- create an ajax enabled web site/wap in vs2005 (or load your existing project if any)

- now open and convert the project in vs2008. Do not change the target framework, this ensures that your web.config and references remains compatible with the .net 2.0 + ajax 1.0 combo.

Maybe a new project (with 2.0 target) in a standalone vs2008 (no vs2005 installed) also works, I'm just wondering that in this case the project how to reference ajax 1.0?!


In doing some more experimentation, here's what I've figured out... sort of:

I converted copies of my old VS2005 web app templates to VS2008 (still targeting .NET 2.0). In fact, I didn't have to do anything special at all to get things to work. Just open the old Solution, tell it to convert, and bingo... things work. Of course this is a SIMPLE Master Pages based template, so nothing fancy going on that might cause trouble. ;)

The basic AJAX Extensions seem to run fine whether the project is targeting .NET 2.0 or 3.5.

I then installed the AJAX Controls for both AJAX 1.0 and the new 3.5 compatible version (two different tabs in the Toolbox in VS2008). When I have a 2.0 compatible project open, only the 2.0 Controls are available in the Toolbox (very smart!). So that makes it dead simple to use the right stuff in the right project(s).

Wanted to share this with the community - in the event someone else needs the help.


sound great. Please do not forget to mark the posts that helped you. By this way the thread will marked as answered.

No comments:

Post a Comment