I basically have in my UpdatePanel a literal that generates a javascript array based on a method in my codebehind.
I don\'t have an issue when it comes to loading my
You could create a simple webservice method that returns the javascript array to the page whenever required and wrap the call to that webservice in a javascript method. Invoking the javascript method to refresh the array in memory on the browser side will work better than expecting the js array literal to be parsed again on UpdatePanel
postbacks with any success.
you can add the following code in Page_Load event:
ScriptManager.RegisterStartupScript(Me.rptGridAlbum, rptGridAlbum.GetType, "scriptname", "somejavascript", True)
This will fire the javascript on your page after the AJAX callback.
MSDN
var prm = Sys.WebForms.PageRequestManager.getInstance();
if (prm != null) {
prm.add_endRequest(function (sender, e) {
if (sender._postBackSettings.panelsToUpdate != null) {
DisplayCurrentTime(); // here your javascript function
}
});
};