AJAX Page - Knowledge Base

« Back to Knowledge Base list

Using UpdatePanelFromPage from content page

Q:

I'm trying to use AjaxPage features in my project but nothing happens when using Master pages.  How can I refer the container control in UpdatePanelFromPage method if it is in content page?

A:

This issue is due to the incorrect controlId used as container argument. When using server controls as container control you have to specify it's ClientID as argument.

If the control is in master page the client Id will be something like this: ctl00_Main_basketcontainer. (<div id="basketcontainer" runat="server">)

It can be commonly used as follows:

ob_post.UpdatePanelFromPage('postbackPanel1', '<% = basketcontainer.ClientID %>', 'aspnet_callbackPanels1.aspx');


You can see the syntax of UpdatePanelFromPage method from here: http://www.obout.com/AJAXPage/ht_updatepanelfrompage.aspx