AJAX.NET, MasterPage and User Control help

In my MasterPage, I have several placeholders that have user controls in them to populate content with. I want to start using AJAX.NET with it (ASP.NET 3.5 and VS2008). This is what my MasterPage looks like:

<%@ Master Language="C#" %>
<%@ Register Src="~/Controls/Header.ascx" TagName="Header" TagPrefix="uc1" %>
<%@ Register Src="~/Controls/Menu.ascx" TagName="Menu" TagPrefix="uc1" %>
<%@ Register Src="~/Controls/MainContent.ascx" TagName="MainContent" TagPrefix="uc1" %>
<%@ Register Src="~/Controls/SubContent.ascx" TagName="SubContent" TagPrefix="uc1" %>
<%@ Register Src="~/Controls/Footer.ascx" TagName="Footer" TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head ID="masterHead" runat="server">
    <link rel="stylesheet" type="text/css" href="/Global.css" />    
      <script type="text/javascript" src="/Global.js"></script>  
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <asp:ContentPlaceHolder ID="AdminPlaceHolder1" runat="server" />
        <div id="header">
            <asp:ContentPlaceHolder ID="HeaderPlaceHolder1" runat="server">
                <uc1:Header ID="HeaderContent1" runat="server" />
        <div id="menu">
            <uc1:Menu ID="MenuPlaceHolder1" runat="server" />

        <div id="content">                    
            <asp:ContentPlaceHolder ID="MainContentPlaceHolder1" runat="server">
                <uc1:MainContent ID="MainContent1" runat="server" />

        <div id="sub-section">                    
            <asp:ContentPlaceHolder ID="SubContentPlaceHolder1" runat="server">
                <uc1:SubContent ID="SubContentContent1" runat="server" />

        <div id="footer">                
            <asp:ContentPlaceHolder ID="FooterPlaceHolder1" runat="server">            
                <uc1:Footer ID="FooterContent1" runat="server" />


I tried to put UpdatePanels around the User Controls, but got a compile error. How do I place my update panels correctly in this scenario?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Daniel ReynoldsSoftware Applications Developer / IntegratorCommented:
I may mis-understand your efforts, but you create a masterpage to use as a template which appears to be what you are trying to do.

You then create a webform and choose the masterpage to be its template.

You appear to be putting all of your user controls in the master page, when you should want to at least put your main content in your webform that is based on the master page.

When you create the webform based on the master page, the new webform will contain the various contentplaceholders that the master page has and in those you would put your code or controls.
bemara57Author Commented:
I'm trying to make each User Control ajax enabled by making it an update panel. This is what I tried but got a compile error:

            <asp:ContentPlaceHolder ID="HeaderPlaceHolder1" runat="server">
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <uc1:Header ID="HeaderContent1" runat="server" />

I'm attempting to make the header section ajax enabled. Without Ajax as it is, everything works fine. The header has some things in that change during postbacks, so I thought putting update panels around it would make it partial reload that section. The compile error I get when I do this is that "Header" doesn't exist in the current context.
Daniel ReynoldsSoftware Applications Developer / IntegratorCommented:
And it doesn't exist in the current context.

Create the Webform using the masterpage as a template and try putting your stuff into the contentplaceholder in the webform. I believe you will have better success.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
bemara57Author Commented:
My site already utilizes the User Control "header" and gets populated thru various processes. I need the User Control on the MasterPage like that. The question is how or where do I put the Update Panel? I tried putting it in the masterpage and then tried putting it within the User Control ascx page itself with no success. Can User Controls cause Ajax events on other User Controls? Say from the header to the footer user controls? Not sure how to set this up or if it's even possible.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.