ASP.Net 2.0, HTML, and Ajax

January 30, 2006

development

I was reading an article about prototype versus atlas and decided to write this code.

It uses AJAX to grab a data bound dropdown list from an ASP.Net 2.0 control. The ASP.Net side of things requires no compilation or DLL because of new features in ASP.Net 2.0. I was able to bind an xml file to the drop down list on the client side (not really client-side but the server is transparent). So, with Javascript I was able to asynchronously 'grab' the control using the http request object. To make it easy, just use the XHConn library for the xhttp request.

the html page:

1:  

2:  

3:  

4:      asp.net control pull

5:      

6:      

17:  

18:  

19:      

asp.net control pull

20:
21: 22:

the aspx code:

1:  

2:   

3:  

4:   

5:  

6:  

7:      control pull

8:  

9:  

10:      

the xml:

1: <?xml version="1.0" encoding="utf-8" ?>

2:

3:

4:

5:

6:

7:

8:

what would you use this for? I'm not sure yet but it may come in handy.

Subscribe to my mailing list