Link to home
Start Free TrialLog in
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
ASKER CERTIFIED SOLUTION
Avatar of Easwaran Paramasivam
Easwaran Paramasivam
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sbornstein2
sbornstein2

ASKER

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