Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7728439
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T05:43:05+00:00 2026-06-01T05:43:05+00:00

I have a series of composite user controls that inherit from a base class

  • 0

I have a series of composite user controls that inherit from a base class which override the Render method of the control. I have put a Substitution control on one of those composite controls; however the substitution content is being written to the top of the output stream instead of where the substitution control is defined. Below is my render method.

In essence what I’m aiming for is donut caching while overriding the Render method on the user controls.

Any thoughts on why this is happening despite the fact that the base render method is being invoked?

protected override void Render(System.Web.UI.HtmlTextWriter writer) {
    System.IO.StringWriter sw = new System.IO.StringWriter();
    System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw);
    base.Render(htw);
    string output = sw.ToString();
    try {
        MyPage objPage = (MyPage)this.Page;
        CustDictionary d = new CustDictionary(objPage);
        output = d.Replace(output);
    }
    catch {
        // do nothing
    }
    writer.Write(output);
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T05:43:06+00:00Added an answer on June 1, 2026 at 5:43 am

    From reviewing Google and a fair bit of testing I did, it seems this is not possible in asp.net 3.5. The goal was to have a control that wasn’t cached, either using the substitution control or by inheriting from a similar control. There are methods of doing this making use of inheritance and other custom controls, but it would require an instantiation of the page within the control to hand-render the control, which would put an unnecessary strain on the application. The end solution for this was to print out the data which was already in a cookie using jQuery.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a series of divs that slide down using -webkit-transform from a negative
I have a dll that has a class called Series. This class has a
I have a series of nested UL's that are like this: <ul class=categorySelect id=>
I have a series of <div class=clear-both></div> after a series of divs. I want
I have a series of logging breakpoints in Xcode4 that I'm using to selectively
I have a series of images that get loaded for a carousel, and it
I have series of curl commands that I want to translate into straight up
I have a series of CodedUI test methods that make up a single test
I have 3 series on my chart. Is it possible to give user only
I have a series of array formulas in Excel that key off of each

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.