To simplify this , We can use the following JavaScript templating engines to make life easier!!
- PURE: http://beebole.com/pure/
- JTemplates: http://jtemplates.tpython.com/
- EJS: http://www.embeddedjs.com/
- http://dotmac.rationalmind.net/2010/05/rotating-content-with-jquery-jtemplates-ajax/
http://encosia.com/2008/06/26/use-jquery-and-aspnet-ajax-to-build-a-client-side-repeater/
http://johnnycoder.com/blog/2008/12/18/jtemplates-with-jquery-ajax-and-json/
http://www.codedigest.com/Articles/jQuery/225_Creating_a_Simple_AJAX_Master-Details_View_Using_jQuery_JSON_and_jTemplates_in_ASPNet.aspx