Basic AJAX Question

J

Jonathan Wood

Greetings,

I'd like to implement some AJAX features on an existing ASP.NET site. I have
one example of doing this but, otherwise, don't know much about it.

I have one question, though, about getting started: I notice that there are
project templates for creating AJAX this and AJAX that. I'm a little
confused about this. Am I not able to add AJAX features to an existing Web
form? Why is it necessary to select an AJAX form or whatever?

Is there some special reason why I have to decide a form is going to use
AJAX before I create that form?

Thanks.
 
D

David Wier

If you use the built in AJAX page Template, everything is added for you,
that you will need (not really a big deal)

Then (bigger deal), if you use the built in AJAX website template, then,
even the Web.config contains all the entries which are necessary

Otherwise, to make sure your site will use Ajax successfully, you need to
update your Web.config file manually with the necessary items to use AJAX
The first time I updated an already existng site to AJAX - I created a
separate AJAX site and compared the two sites, including web.config files
and bin folders - adding all the necessary items to the existing site which
are needed.

There should be a number of pages/websites which actually have a list of the
items you need to update in the Web.config -

David Wier
http://aspnet101.com
http://iWritePro.com - One click PDF, convert .doc/.rtf/.txt to HTML with no
bloated markup
 
G

gnewsgroup

Greetings,

I'd like to implement some AJAX features on an existing ASP.NET site. I have
one example of doing this but, otherwise, don't know much about it.

I have one question, though, about getting started: I notice that there are
project templates for creating AJAX this and AJAX that. I'm a little
confused about this. Am I not able to add AJAX features to an existing Web
form? Why is it necessary to select an AJAX form or whatever?

Is there some special reason why I have to decide a form is going to use
AJAX before I create that form?

Thanks.

I think you are talking about those website templates which you can
select at the time you create a website. When you select an AJAX
template to create a web site, Visual Studio will do the necessary
configurations in web.config (maybe somewhere else as well) for you.

True, you can always select to create a regular ASP.Net website, and
configure it yourself in Web.config if you want to add some AJAX
features later on.
 
C

Cowboy \(Gregory A. Beamer\)

Jonathan Wood said:
Greetings,

I'd like to implement some AJAX features on an existing ASP.NET site. I
have one example of doing this but, otherwise, don't know much about it.

I have one question, though, about getting started: I notice that there
are project templates for creating AJAX this and AJAX that. I'm a little
confused about this. Am I not able to add AJAX features to an existing Web
form?

You are able.
Why is it necessary to select an AJAX form or whatever?

Just a shortcut to add the controls necessary for AJAX controls on the page.
In particular, this adds the ScriptManager (and UpdatePanel?).
Is there some special reason why I have to decide a form is going to use
AJAX before I create that form?

No, but you will have to add the proper controls later, if not.


--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
 
J

Jonathan Wood

David,
If you use the built in AJAX page Template, everything is added for you,
that you will need (not really a big deal)

Then (bigger deal), if you use the built in AJAX website template, then,
even the Web.config contains all the entries which are necessary

Okay, I'll just have to figure that out than.
Otherwise, to make sure your site will use Ajax successfully, you need to
update your Web.config file manually with the necessary items to use AJAX
The first time I updated an already existng site to AJAX - I created a
separate AJAX site and compared the two sites, including web.config files
and bin folders - adding all the necessary items to the existing site
which are needed.

There should be a number of pages/websites which actually have a list of
the items you need to update in the Web.config -

I don't recall seeing that in the one example I saw but will keep an eye out
for it..

I purchased an introduction to AJAX but it has loads of stuff I simply don't
need to know at this point, and it was written before VS2008 and so there's
a bunch of stuff that doesn't even seem to apply. I gave up on it and am
looking for a source for a brief tutorial on getting it up and running on
VS2008.

Thanks.
 
J

Jonathan Wood

Thanks. Since my site is already well underway, I don't really have the
luxury of creating it from a template.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com

Greetings,

I'd like to implement some AJAX features on an existing ASP.NET site. I
have
one example of doing this but, otherwise, don't know much about it.

I have one question, though, about getting started: I notice that there
are
project templates for creating AJAX this and AJAX that. I'm a little
confused about this. Am I not able to add AJAX features to an existing Web
form? Why is it necessary to select an AJAX form or whatever?

Is there some special reason why I have to decide a form is going to use
AJAX before I create that form?

Thanks.

I think you are talking about those website templates which you can
select at the time you create a website. When you select an AJAX
template to create a web site, Visual Studio will do the necessary
configurations in web.config (maybe somewhere else as well) for you.

True, you can always select to create a regular ASP.Net website, and
configure it yourself in Web.config if you want to add some AJAX
features later on.
 
C

Cowboy \(Gregory A. Beamer\)

The two main things you have to work with are:

1. Ensuring the web.config is set up correctly. This can be done after the
fact by eitehr a) typing or b) copying from an AJAX site.

2. Adding the ScriptManager (at minimum) and other controls (UpdatePanel
most commonly) to the page you are updating.

Then, follow the examples you find on the web to get the type of
functionality you desire.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box!
|
*************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

AJAX v. Postback 4
AJAX template 2
AJAX Futures CTP 1
ASP.NET Ajax vs jQuery 3
Include AJAX in existing web 2
How to enable AJAX in ASPX page after the fact 5
new Ajax Site 8
ajax toolkit 2

Top