Skins disappear when overriding Render method

Discussion in 'ASP .Net' started by John, Aug 28, 2006.

  1. John

    John Guest

    I'm trying to override the page's render method, and capture the result for
    processing, eg:

    protected override void Render(HtmlTextWriter writer)
    {
    //base.Render(writer);
    StringBuilder renderedOutput = new StringBuilder();
    using (StringWriter strWriter = new StringWriter(renderedOutput))
    {
    using (HtmlTextWriter tWriter = new HtmlTextWriter(strWriter))
    {
    base.Render(tWriter);
    }
    }

    // save renderedOutput.ToString() to a file
    }

    This works great, but my page theme (specifically gridview skins) arn't
    applied! If I replace the call to base.Render() they work fine - does this
    mean skins / themes arn't rendered in Render()???

    Thanks,

    John
    John, Aug 28, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Lau Lei Cheong

    Page.Render do not render complete page

    Lau Lei Cheong, May 15, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    2,044
    Lau Lei Cheong
    May 15, 2004
  2. Yama

    Overriding Render Event

    Yama, Oct 21, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    457
  3. Stephen Miller
    Replies:
    12
    Views:
    736
    Stephen Miller
    Jan 20, 2004
  4. Peter Colson

    Overriding ImageButton Render in a custom control

    Peter Colson, Nov 18, 2003, in forum: ASP .Net Web Controls
    Replies:
    3
    Views:
    304
    Peter Colson
    Nov 18, 2003
  5. Glenn Gillen
    Replies:
    0
    Views:
    259
    Glenn Gillen
    Nov 17, 2006
Loading...

Share This Page