Good Morning,

I would like to open a discussion regarding the best approach to use for creating an AJAX enabled application that operates outside the normal ASP.NET page lifecycle.

In my company, we have deployed an ASP.NET application which makes use of update panels. Some of our clients are in low bandwidth areas and suffer from slow performance, largely because of viewstate. As you know, the entire viewstate is sent back to the server every time you want to do a partial page update and there tends to be a lot of controls on our pages.

We are changing our application model to move away from the ASP.NET page lifecycle and minimise what is sent back to the server. Our application will exist on one single page and load content dynamically using web services or page methods.

This change presents a few challenges;
1) When a user control is dynamically loaded, we also have to load the related javascript/jquery. Ideally, I would like to be able to reference controls on the page the same way we would with inline javascript (i.e var mycontrol = $get('<%=mycontrol.ClientID%>'); ) or something that gives the same functionality.

2) There may be several instances of the control created on the page. Each should maintain its own naming container, prefixing controls accordingly.

3) The controls need to be able to raise and process jquery events.

I've found a really good example here:
http://samuelmueller.com/2008/12/dyn...s-with-jquery/

I have to admit to being somewhat new to jquery, so at the moment a lot of this is over my head.

We have built a rather crude prototype to demonstate the abilities and speed of these techniques to our clients. We have found ourselves creating inline html in the webservices to pass back to our callback functions. Webservices and javascript are registered with the Script Manager. This is very tedious and difficult to maintain, and I am looking for a better way.

Thanks very much for reading. I look forward to hearing some of your experiences and I will write an article when I have a definitive way forward.

Michael