Asp.Net - Super Curious on AJAX Approach 1

I tested AJAX .NET library before this, but I will like to know how you can do AJAX without 
that library.
ASP.NET is an event driven approach and it supports postback. Sometimes I am frustrated with 
ASP.NET (PHP or JSP as well), as I need to refresh the page every time I click the button. 
Luckily Microsoft is working on with Atlas framework and there are few free libraries that 
enable you to do AJAX easier.
AJAX is actually not new, but it started to be very popular when Google uses this. Maybe Google 
is popular among us. [Correct me if I am wrong :)]
In order to implement AJAX within Internet Explorer environment, you can take a look at the MSXML 
parser XMLHTTP class. This class is the key to implement AJAX model within Internet Explorer. But, 
I am not so sure whether this works on other browsers.
Sample Code:
// <HEAD><SCRIPT> 
obj = new ActiveXObject("Msxml2.XMLHTTP");
obj = new ActiveXObject("Microsoft.XMLHTTP");
// </SCRIPT></HEAD>
I am also wondering; can AJAX works at the same time with PostBack? Any idea?
In order to work with AJAX, you need to be strong in JavaScript. :(  Okay, I didn't use JavaScript 
for some time. 
Published Thursday, September 22, 2005 11:06 AM by chuawenching
Filed under:

Comments

# re: Asp.Net - Super Curious on AJAX Approach 1

Friday, October 06, 2006 11:03 AM by alvinz_c

I have been working on AJAX.NET library for sometimes including using it in my AJAX-based custom server control. That was cool, and still is... The library is now ready for the JAVA environment too.

Besides the AJAX.NET, I used the prototype.js (I recommend it too). That is the js library that beyond AJAX implementation.

Working AJAX on postback? Erm... I dont think so because the AJAX.NET does not support viewstate. You may do persist the values by specifying the enabling the Session support in the AjaxMethod attribute.

To master AJAX, knowing DOM and JSON is prerequisite.

You can check alvinzc.blogspot.com for some examples of AJAX.