Join Date: July 2007
Location: India ( Chennai )
Posts: 24
Basic Ajax
Save the file as "testAjax.asp" <html> <head> <title>:: Ajax ::</title> <script language="javascript"> function ajaxSide(strQuery) { 'Pass url with Query String strUrl = "serverside.asp?q="+strQuery;
'Creating the ajax 'sending value to serverside file. var xmlhttp = new ActiveXObject("Microsoft.Xmlhttp"); xmlhttp.open("GET",strUrl,false);
xmlhttp.send(strUrl);
'Get's value from serverside DivMsg.innerHTML = xmlhttp.responseText; } </script> </head> <body>
Check the file loading content from serverside to client side using Ajax.<br /> <a href="javascript:ajaxSide(1);">1</a> <br /> <a href="javascript:ajaxSide(2);">2</a> <br /> <div id="DivMsg"></div>
</body> </html> ---------------End Here ------------
Save the page as "serverside.asp" <% q = request("q")
if(q=1) then Response.Write("One") elseif(q=2) then Response.Write("Two") end if %>
luther singh
Posted on Aug 3, 2007
Join Date: August 2007
Location: India ( chennai )
Posts: 1
Ajax with Asp.net 2.0
Hi This is luther from chennai. i want to learn ajax with asp.net. is there any website for learning ajax pls help me. thnks