Saturday, March 24, 2012

Load On-demand using PopupControlExtender

Hi-

I am displaying a Panel that contains a web usercontrol using PopupControlExtender in AJAXToolKit. Since the web usercontrol has pretty expensive database task, I would like to display the Panel only when a user clicked on a link that displays the PopupControlExtender.

Is there a way to accomplish this? Please advice.

Regards,

Prabhu

Hi Prabhu,

According to my understanding to your question, you plan to load contents of a popup dynamically via asynchronous request.

Here isa thread that implement dynamical loading with TabContainer extender, you may try the same solution. The only difference is that you may need to invoke the method that fetches data in popup showing event handler. For instance:

<ajaxToolkit:PopupControlExtender ID="PopupControlExtender2" runat="server"BehaviorID="pce" ......... />
function pageLoad(sender, args)
{
$find("pce")._popupBehavior.add_showing(onPopupShow);

}

function onPopupShow(sender, args)
{
// get data dynamically here
}

Hope this helps.

No comments:

Post a Comment