Avatar of sbornstein2
sbornstein2
 asked on

ASP.Net UpdatePanel ContentTemplate Render Question

Hello all,

I am writing a server control and I have pretty much everything needed except one thing I am stuck on.  In the rendercontents I am rendering out all the HTML tags and controls I need.  However, the controls okay easy to render with rendercontrol.   The question I have is how do I get into the inside of the update panel contenttemplate to start the HTML writes within those tags.  For example:

<asp:UpdatePanel runat="server" id="UpdatePanel" updatemode="Conditional">
  <ContentTemplate>
                <asp:Label runat="server" id="DateTimeLabel1" />
                <asp:Button runat="server" id="UpdateButton1" onclick="UpdateButton_Click" text="Update" />          
<table><tr><td></td></tr></table>    
            </ContentTemplate>
         </asp:UpdatePanel>

so for example in my render:
  protected override void RenderContents(HtmlTextWriter output)
        {
this.UpdatePanel1.RenderControl(output);
output.RenderBeginTag(HtmlTextWriterTag.Table);
}

I am stuck on how do I get into the internal part of the UpdatePanel.  Thanks all
ASP.NETC#

Avatar of undefined
Last Comment
sbornstein2

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Easwaran Paramasivam

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
sbornstein2

ASKER
still confused because how does this let me write to the content template?  
sbornstein2

ASKER
thanks
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck