troubleshooting Question

ASP.Net UpdatePanel ContentTemplate Render Question

Avatar of sbornstein2
sbornstein2 asked on
ASP.NETC#
3 Comments1 Solution874 ViewsLast Modified:
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
Easwaran Paramasivam
Senior Software Engineer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros