469,317 Members | 1,989 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,317 developers. It's quick & easy.

AJAX "After the Fact"

Can anyone point me to any good resources on adding AJAX to a page once the
page has already been created? I know VS2008 has options to add AJAX pages,
but I didn't select those options when the pages were created.

Thanks.

Jonathan

Jun 27 '08 #1
11 1327
"Jonathan Wood" <jw***@softcircuits.comwrote in message
news:e8**************@TK2MSFTNGP05.phx.gbl...
Can anyone point me to any good resources on adding AJAX to a page once
the page has already been created? I know VS2008 has options to add AJAX
pages, but I didn't select those options when the pages were created.

Thanks.

Jonathan
I'd create a new Ajax web site. Take a look at the web.config and copy the
Ajax stuff into your old config, basically anything that's not there
previously. You can then add a ScriptManager to the web form and you're set.

--

Joe Fawcett (MVP - XML)

http://joe.fawcett.name
Jun 27 '08 #2

"Jonathan Wood" <jw***@softcircuits.comwrote in message
news:e8**************@TK2MSFTNGP05.phx.gbl...
Can anyone point me to any good resources on adding AJAX to a page once
the page has already been created? I know VS2008 has options to add AJAX
pages, but I didn't select those options when the pages were created.

Thanks.

Jonathan
Check out this site. Has great videos to tell you all about ajax

http://www.asp.net/AJAX/documentation/

LS

Jun 27 '08 #3
You must need to add script control to the page....
But you must change web.config once to support AJAX (in VS2005 ) in VS 2008
it's there by default I believe.

George.

"Jonathan Wood" <jw***@softcircuits.comwrote in message
news:e8**************@TK2MSFTNGP05.phx.gbl...
Can anyone point me to any good resources on adding AJAX to a page once
the page has already been created? I know VS2008 has options to add AJAX
pages, but I didn't select those options when the pages were created.

Thanks.

Jonathan

Jun 27 '08 #4
Thanks. Yeah, that site has a lot of information about AJAX. Couldn't find
where it talked about adding it after the fact though.

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

"Lloyd Sheen" <a@b.cwrote in message
news:u8**************@TK2MSFTNGP06.phx.gbl...
>
"Jonathan Wood" <jw***@softcircuits.comwrote in message
news:e8**************@TK2MSFTNGP05.phx.gbl...
>Can anyone point me to any good resources on adding AJAX to a page once
the page has already been created? I know VS2008 has options to add AJAX
pages, but I didn't select those options when the pages were created.

Thanks.

Jonathan

Check out this site. Has great videos to tell you all about ajax

http://www.asp.net/AJAX/documentation/

LS
Jun 27 '08 #5
I really dislike this. In VS2008, my web.config files are automatically
loaded with tons of stuff. Then, when I need to deploy my app and create a
"live" version of the config file, it's nearly impossible to strip out stuff
I don't need or don't want (or determine which is which). The idea of trying
to copy everything from one config file to another that is not already in
the target file would not only be an enormous task that would be very
tedious and prone to errors, but it would seem like it would be undesirable
as well.

The web.config file is a great idea but I can see now it's going to grow
into a monster just like the Windows registry did.

I can't believe adding AJAX to an existing page is going to be this much
trouble.

Thanks.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
"Joe Fawcett" <jo********@newsgroup.nospamwrote in message
news:eZ**************@TK2MSFTNGP03.phx.gbl...
"Jonathan Wood" <jw***@softcircuits.comwrote in message
news:e8**************@TK2MSFTNGP05.phx.gbl...
>Can anyone point me to any good resources on adding AJAX to a page once
the page has already been created? I know VS2008 has options to add AJAX
pages, but I didn't select those options when the pages were created.

Thanks.

Jonathan
I'd create a new Ajax web site. Take a look at the web.config and copy the
Ajax stuff into your old config, basically anything that's not there
previously. You can then add a ScriptManager to the web form and you're
set.

--

Joe Fawcett (MVP - XML)

http://joe.fawcett.name

Jun 27 '08 #6
re:
!I can't believe adding AJAX to an existing page is going to be this much trouble

It's not.

The easiest way I've found to do that is to create
a new Ajax application, and saving the web.config file.

All you have to do then is copy and paste the contents
of the web.config to any non-Ajax application's web.config.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Jonathan Wood" <jw***@softcircuits.comwrote in message news:un**************@TK2MSFTNGP02.phx.gbl...
>I really dislike this. In VS2008, my web.config files are automatically loaded with tons of stuff. Then, when I need to
deploy my app and create a "live" version of the config file, it's nearly impossible to strip out stuff I don't need or
don't want (or determine which is which). The idea of trying to copy everything from one config file to another that is
not already in the target file would not only be an enormous task that would be very tedious and prone to errors, but
it would seem like it would be undesirable as well.

The web.config file is a great idea but I can see now it's going to grow into a monster just like the Windows registry
did.

I can't believe adding AJAX to an existing page is going to be this much trouble.

Thanks.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
"Joe Fawcett" <jo********@newsgroup.nospamwrote in message news:eZ**************@TK2MSFTNGP03.phx.gbl...
>"Jonathan Wood" <jw***@softcircuits.comwrote in message news:e8**************@TK2MSFTNGP05.phx.gbl...
>>Can anyone point me to any good resources on adding AJAX to a page once the page has already been created? I know
VS2008 has options to add AJAX pages, but I didn't select those options when the pages were created.

Thanks.

Jonathan
I'd create a new Ajax web site. Take a look at the web.config and copy the Ajax stuff into your old config, basically
anything that's not there previously. You can then add a ScriptManager to the web form and you're set.

--

Joe Fawcett (MVP - XML)

http://joe.fawcett.name


Jun 27 '08 #7
Juan,
!I can't believe adding AJAX to an existing page is going to be this
much trouble

It's not.

The easiest way I've found to do that is to create
a new Ajax application, and saving the web.config file.

All you have to do then is copy and paste the contents
of the web.config to any non-Ajax application's web.config.
As I mentioned previously, I find working with the web.config file can be
unwieldy. I've spent a LOT of time tweaking the two versions of web.config
(development and deployed versions) for this particular application. There's
no way I'd copy and paste the entire contents of a brand new web.config
file. And I have no idea how readily I'll be able to determine what part of
the config file is AJAX related.

Surely others have done this before. I just can't believe it's this much
trouble.

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

Jun 27 '08 #8

"Jonathan Wood" <jw***@softcircuits.comwrote in message
news:e1**************@TK2MSFTNGP04.phx.gbl...
Juan,
>!I can't believe adding AJAX to an existing page is going to be this
much trouble

It's not.

The easiest way I've found to do that is to create
a new Ajax application, and saving the web.config file.

All you have to do then is copy and paste the contents
of the web.config to any non-Ajax application's web.config.

As I mentioned previously, I find working with the web.config file can be
unwieldy. I've spent a LOT of time tweaking the two versions of web.config
(development and deployed versions) for this particular application.
There's no way I'd copy and paste the entire contents of a brand new
web.config file. And I have no idea how readily I'll be able to determine
what part of the config file is AJAX related.

Surely others have done this before. I just can't believe it's this much
trouble.

--
Jonathan Wood
SoftCircuits Programming
http://www.softcircuits.com
The video you want to look at for hints is:

http://www.asp.net/learn/ajax-videos/video-81.aspx

LS

Jun 27 '08 #9
re:
!I just can't believe it's this much trouble

Again, it's not.

All you need to determine is whether system.web.extensions
and the Script Manager are installed.

See : http://msdn.microsoft.com/en-us/library/bb907614.aspx
for what you need to look for.

As far as the actual web.config lines needed, they are :

1.
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensions SectionGroup,
System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">

2.
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

2a.
dependentAssembly...
assemblyIdentity name="System.Web.Extensions.Design

3.
....and the lines which refer to the "ScriptHandlerFactory", "ScriptHandlerFactoryAppServices" and "ScriptResource"

That's it...

All the rest of the stuff in web.config is other .Net 3.5-related.

But, again, the best way to handle this is not to perform surgery
on an existing app but, rather, to create a new Ajax-enabled app
and add whatever functionality you have in your Ajax-less app.

You can't go wrong with that.

Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Jonathan Wood" <jw***@softcircuits.comwrote in message news:e1**************@TK2MSFTNGP04.phx.gbl...
Juan,
>!I can't believe adding AJAX to an existing page is going to be this much trouble

It's not.

The easiest way I've found to do that is to create
a new Ajax application, and saving the web.config file.

All you have to do then is copy and paste the contents
of the web.config to any non-Ajax application's web.config.

As I mentioned previously, I find working with the web.config file can be unwieldy. I've spent a LOT of time tweaking
the two versions of web.config (development and deployed versions) for this particular application. There's no way I'd
copy and paste the entire contents of a brand new web.config file. And I have no idea how readily I'll be able to
determine what part of the config file is AJAX related.

Surely others have done this before. I just can't believe it's this much trouble.

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

Jun 27 '08 #10
Cool. Thanks!

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

"Lloyd Sheen" <a@b.cwrote in message
news:%2***************@TK2MSFTNGP05.phx.gbl...
>
"Jonathan Wood" <jw***@softcircuits.comwrote in message
news:e1**************@TK2MSFTNGP04.phx.gbl...
>Juan,
>>!I can't believe adding AJAX to an existing page is going to be this
much trouble

It's not.

The easiest way I've found to do that is to create
a new Ajax application, and saving the web.config file.

All you have to do then is copy and paste the contents
of the web.config to any non-Ajax application's web.config.

As I mentioned previously, I find working with the web.config file can be
unwieldy. I've spent a LOT of time tweaking the two versions of
web.config (development and deployed versions) for this particular
application. There's no way I'd copy and paste the entire contents of a
brand new web.config file. And I have no idea how readily I'll be able to
determine what part of the config file is AJAX related.

Surely others have done this before. I just can't believe it's this much
trouble.

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

The video you want to look at for hints is:

http://www.asp.net/learn/ajax-videos/video-81.aspx

LS
Jun 27 '08 #11

Try this...
http://www.bennysutton.com/Ajax/default.aspx

*** Sent via Developersdex http://www.developersdex.com ***
Jun 27 '08 #12

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Luc Saffre | last post: by
3 posts views Thread by Kevin Pedersen | last post: by
13 posts views Thread by Bob Day | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.