I want to create async load of visual web part. Code behind (web part) needs some time to load data so I figure to create that in async way (on page load). Scriptmanager is placed in master page (ajax support is enabled) so I tried to do that with asp:update panel (+ update progress control - to be shown while data is not loaded) but i don't know how to do postback because I don't have any control which should be triggered to do postback (and I must not have any(!), at least to be visible). I found some documentation about SPG.AJAXSupport but solution for VS2010 doesn't have project for AJAXSupport, and solution for VS2008 (MOSS 2007) I can't open because it need some wild project templates which I can't find.

Please can somebody can give me some valuable information how can I do that (via javascript or any other reasonable way)?!? Also does somebody have binaries of SPG to send me?

My javascript code (for now) looks like:

<script language="javascript" type="text/javascript">
var prm = Sys.WebForms.PageRequestManager.getInstance();

var postBackElement;

//fired when the update starts
function InitializeRequest(sender, args) {
    postBackElement = args.get_postBackElement();
    var mainPanel = document.getElementById('<%=panelMain.ClientID%>');
    mainPanel.style.display = 'none';

//fired when the update ends
function EndRequest(sender, args) {
    //Show your update panel here

1 Answer 1


I think you want to use a Timer inside your UpdatePanel.

For example (from the article):

<asp:UpdatePanel runat="server" id="UpdatePanel1">
<asp:Timer runat="server" id="Timer1" Interval="10000" OnTick="Timer1_Tick"></asp:Timer>
<asp:Label runat="server" Text="Page not refreshed yet." id="Label1">

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.