Been bumping my head against this one for a week now so I figured I'd better call in the experts :) .
The problem is more an aesthetic one than an actual code problem but I suspect they might be related. In my program I have a series of user controls that are dynamically added to a web page. These user controls can contain pretty much anything (within reason), the ones I am working with now contain a button and a chart (generated via Javascript) but can get more complex. The dynamic controls are added through the "Page_Init" event and all render 100% correct. I have no problems in this regard.
The problem occurs when I have a postback in one of the controls. When a postback occurs the "Page_Init" events regenerates all the dynamic controls before executing the code in the postback. All normal according to the page life-cycle model. However, since the postback happens in only one of the controls, I would like it if only that control re-renders. As it is now all three the controls re-render which can get distracting for the user.
Is there a way to perhaps intercept the postback generated by the button and handle it via AJAX at the server? Telerik's "RadAjaxManager" does something very similar like this but sadly this component is not available to me and I don't need anything that complex. I know one suggestion is to write the control using AJAX and Webservices but this will be too difficult in my scenario seeing as the dynamic controls can contain static controls of their own.
So in short:
-> Have three functional dynamic controls with quite complex server-side code. Works correctly functionality wise. Cannot convert to pure Javascript/Web-service code.
-> When one of the controls do a postback, all three re-render. Gets distracting for the user especially if pop-ups are involved.
-> Need a way to re-render only the control that is being updated.
Thanks!