Updating updatepanel from javascript

Let’s answer the most popular question about Update Panels; "How can I update an Update Panel with Java Script on client-side?" Officially there is no tool or library/interface providing this feature.However there is always a solution :) Before going under the hood, I will introduce you my simple solution; Update Panel Java Script Extender.You can download it and use Java Script to update your Update Panel.Secondly, just drag-n-drop the control to your web site. One of them is the well-know ajax extender property Target Control ID.The ID of the Update Panel, which will be refreshed with Java Script, should be assigned to Target Control ID. This is the name of the Java Script command, which you will use to update the Update Panel assigned to Target Control ID. On Update property should have the name of the code-behind function to run when a client-side update request happens.Client-side Java Script command example; The function name is provided by the Client Command property of Update Panel Java Script Extender.The javascript function can have only one parameter, however you can pass as many parameter as you want and any type of object by serializing them with JSON.

The server-side event handler has an extra parameter named as “parameter”.

This is the parameter send by the Java Script function.

Moreover you can send parameters to the code-behind too.

Download the control (link at the end of the article) and add it to your toolbox.

Visual Studio will automatically add Ajax Control Toolkit reference to your web site as well.

Search for updating updatepanel from javascript:

updating updatepanel from javascript-81updating updatepanel from javascript-60updating updatepanel from javascript-89

The Update Panel Java Script Extender is build on Ajax Control Toolkit Extender base libraries.

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “updating updatepanel from javascript”