calling javascript function from C# while using CallBackPanel

hi

i m using CallBackPanel for refreshing my treeview but i need to run a javascript code while refreshing it. so i just want to know how can i call that code from the C# code. that we similar achieve using page.RegisterClientScriptBlock while using UpdatePanel..

thanks
Dalvir Singh


1 Reply

AD Administrator Syncfusion Team March 31, 2008 08:53 AM UTC

Hi Dalvir,

Thank you for your interest in Syncfusion Products.

If your intention is to invoke javascript code from CallbackPanel1_CallbackRefresh() method, AfterCallbackResponseProcessedScript property is used. We need to specify which JavaScript function should be called using AfterCallbackResponseProcessedScript property. Please find the following code snippet that illustrates this:


protected void CallbackPanel1_CallbackRefresh(object sender, Syncfusion.Web.UI.WebControls.Shared.CancellableCallbackEventArgs e)
{
CallbackPanel1.AfterCallbackResponseProcessedScript = "javascript:TestScript()";
}


If I have misunderstood your requirement, could you please explain in detail of your requirement so that I could work out and provide you a better solution?

Please let me know if any concerns.

Regards,
Fathima


Loader.
Up arrow icon