Load multiple dynamic controls in an aspx page Asynchronous, Load the page itself Asynchronously

I want to load multiple dynamic controls in an aspx page Asynchronous.
I would like to load the page asynchrounously even if it is a blank white screen, than have each dynamic control load independently.

I am not concerned if the user will know something is happening on the page while each control loads or not.

I want to load the page itself Asynchronously, I want it to load independently from the controls.

The situation is I can change the pages aspx and I can write inline code or html on the page, but I can not change the controls. There is no code behind and none can be written.

The page is using a masterpage, which I can modify with inline code or html on the page.
Javascript or JQuery can be used and new classes can be created.

I have Ajax Extensions installed and I am using Visual Studio 2008, 3.5 framework.

The page does the following:

Has a content place holder

Than a table with a row and the cells in the row have div tags, inside the div tags is the control.

The pattern repeats itself a few times until the end of the page.

I can not show the code, but the concept I am describing is it in a nut shell.

iDOTNETCoderAsked:
Who is Participating?
 
masterpassConnect With a Mentor Commented:
Use the asp update panel to do every thing async

for jquery ajax use the ondocumentready function

http://docs.jquery.com/Tutorials:Introducing_$%28document%29.ready%28%29
0
 
iDOTNETCoderAuthor Commented:
Hi, Masterpass,
Could you show me an explicit an example.

Like show me a page that uses a master page that has a contentplacehodler than inside has a table with div tags in its cells and dy controls that would use in the jquery script?

Thanks in advance for your help.
0
 
masterpassCommented:
Could you show me an explicit an example >>>>>>>>>>> It would be better if you could show some of the code and we work on that , rather than me trying to build a new sample
0
 
iDOTNETCoderAuthor Commented:
Hi, MasterPass,

My applogies for the delay, the code sample is below:
<asp:Content ContentPlaceholderID="PlaceHolderMain" runat="server">
<table width="100%" cellspacing="0">		
		<tr>
			<td width="30%" valign="top" style="min-width:255px">				
				<div id="LeftUpper">
				<AsyncCtrl:ControlLeftUpper id="ZoneLeftUpper" runat="server"/>
				</div>
				<div id="LeftMiddle">
				<AsyncCtrl:ControlLeftMiddle id="ZoneLeftMiddle" runat="server"/>
				</div>
				<div id="LeftLower">
				<AsyncCtrl:ControlLeftLower id="ZoneLeftLower" runat="server"/>
				</div>
			</td>
			<td><IMG SRC="/_layouts/images/blank.gif" width="20px" height=100% alt=""></td>
			<td width="70%" valign="top" style="min-width:615px">						
				<table style="width: 100%">
					<tr>
						<td colspan="3" valign="top">
							<div id="RightUpper" >
							<AsyncCtrl:ControlRightUpper id="ZoneRightUpper" runat="server"/>
							</div>
						</td>
					
					</tr>
					<tr>
						<td width="55%" style="min-width:315px" valign="top">
							<div id="Center">
							<AsyncCtrl:ControlCenter id="ZoneCenter" runat="server"/>
							</div>
						</td>
						<td>
							<IMG SRC="/_layouts/images/blank.gif" width="20px" height=100% alt="">
						</td>
						<td width="45%" style="min-width:280px" valign="top">
							<div id="RightCenter">
							<AsyncCtrl:ControlRightCenter id="ZoneRightCenter" runat="server"/>
							</div>
						</td>
					</tr>
					<tr>
						<td colspan="3" style="min-width:615px">
							<div id="RightLower">
							<AsyncCtrl:ControlRightLower id="ZoneRightLower" runat="server"/>
							</div>
						</td>
					</tr>
				</table>
			</td>
		</tr>
	</table>
</asp:Content>

Each user control looks like the following:

<%@ Control Language="C#" %>

<script runat="server">
    protected override void OnInit(EventArgs e)
    {
        System.Web.UI.WebControls.Label lbl1 =
        new System.Web.UI.WebControls.Label();
        this.Controls.Add(lbl1);
    }
</script>

I want to load this user control Async and than another control is loading a control into the label,
I don't know what is going to be loaded in the lable.
But, I would like to use and image in the label until the other control loads what it wants there.

If I use Jquery the Jquery script will need to be external file location.

Open in new window

0
 
iDOTNETCoderAuthor Commented:
I found the solution that work is to add a scriptmanager to the page and make sure partialpagerendering is true, than place each control in its own update panel.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.