Controls rendered before body when using base class?

Discussion in 'ASP .Net' started by Dave, Feb 21, 2004.

  1. Dave

    Dave Guest

    Hi, I'm having a problem with my web page. I made a user aspx page
    Child.aspx that inherits from a base class TemplatePage
    (TemplatePage.cs). The template class overrides Render, streams some
    html from a header template html file, calls base.Render(), and then
    streams some html from a footer template file. I put some text in the
    body of child.aspx and it looks perfect. Now I want to put a user
    control on child.aspx that draws a little table and puts pictures in
    each cell. My control appears and draws correctly, however, it appears
    before my template code! So I have my pictures on top and then
    underneath my html from my template!!

    Why is this happening? I figured that if I moved the html template
    stream code in the base class from Render() to PreRender() then it would
    get called before the control renders, but this doesn't seem to help.

    Thanks for any info!


    Meet people for friendship, contacts,
    or romance using free instant messaging software! See a picture you
    like? Click once for a private conversation with that person!
    Dave, Feb 21, 2004
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.