.NET and Ajax Question

N

needin4mation

Hi, I am interested in use AJAX, Javascript, .NET, etc. to retrieve
information from a "real" database, not an XML file. I am trying to
find out if that is a legitimate approach. All of the examples I have
seen use AJAX to get the data from a XML file using XSL. Or do I use
regular ASP.NET and ADO.NET to retrieve data and send it back
surrounded by XML tags to a file and then the XSL file. Not real sure
how to proceed here. I don't want to implement the wrong technology.
Any comments are welcome. Thanks
 
D

David Browne

Hi, I am interested in use AJAX, Javascript, .NET, etc. to retrieve
information from a "real" database, not an XML file. I am trying to
find out if that is a legitimate approach. All of the examples I have
seen use AJAX to get the data from a XML file using XSL. Or do I use
regular ASP.NET and ADO.NET to retrieve data and send it back
surrounded by XML tags to a file and then the XSL file. Not real sure
how to proceed here. I don't want to implement the wrong technology.
Any comments are welcome. Thanks

Web clients generally cannot connect directly to your databases.

In the AJAX model you would typically retrieve XML data from a web service
or ASPX page on your web server. The web server should handle commnicating
to the back-end databases and formatting the data as XML.

David
 
J

Jeremy Chapman

It is absolutely a legitimate approach.

There are some pretty good free ajax implementations out there, or you can
write your own.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/ASPNetSpicedAjax.asp

All you're really doing is making an http request using javascript, which is
then handled by a asp.net page. the page deciphers the request, and calls
the appropriate method (server side). In this method you can read data from
where ever you want, as your dealing in server side code now so it's easy
enough to get from a database. Once you've got your data, you need to
return it in a format that you can read in javascript. this could be just
text, or xml or Javascript object model (json).

You can download a good free ajax library here: (it has good docs and
samples)
http://ajaxpro.schwarz-interactive.de/
 

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

Members online

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,160
Latest member
CollinStri
Top