Hi,
To register client script in partial postback scenario, please use ScriptManager.RegisterClientScriptInclude method.
Hope this helps.
In order to call a javascript function on every partial update, you need to add a page loaded event handler using the page request manager:
http://ajax.asp.net/docs/ClientReference/Sys.WebForms/PageRequestManagerClass/PageRequestManagerPageLoadedEvent.aspx
I hope this helps.
This morning I came upon an approach that avoids the issue and will provide more long term flexibility.
Instead of embedding the stock quote HTML via a JavaScript include, I am making a HTTP request for the stock quote HTML in the Page_Load event. When the UpdatePanel refreshes, I now get the stock quote data on the server side and paste it into a Literal control for display on the client. This will allow me to also cache data on the server side as desired to reduce the traffic to the external provider.
Thanks for your help.
No comments:
Post a Comment