We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

calling javascript function from C# while using CallBackPanel

Thread ID:

Created:

Updated:

Platform:

Replies:

72510 Mar 25,2008 02:46 AM Mar 31,2008 04:53 AM ASP.NET Web Forms (Classic) 1
loading
Tags: Tools
Dalvir Singh
Asked On March 25, 2008 02:46 AM

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


Administrator [Syncfusion]
Replied On March 31, 2008 04:53 AM

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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;