Control Rendering problem...

Discussion in 'ASP .Net' started by Darren Clark, Jun 19, 2004.

  1. Darren Clark

    Darren Clark Guest

    I am writting server contorl that inherits from the TextBox.

    The problem is.... that my code that i want to be sent out is... but the
    actual textbox is now

    sOutput contains the code that i want to be written out.... But how do i
    tell it to write out the TextBox as well?
    protected override void Render(HtmlTextWriter output)

    {

    this.SetInputType(); // Are we up level or down?

    this.GetClientScripts(); // register client scripts


    string sOutput = this.BuildControls();

    output.Write(sOutput);

    }
     
    Darren Clark, Jun 19, 2004
    #1
    1. Advertising

  2. Darren Clark

    Darren Clark Guest

    Thank you anyway
    i fount it
    Need to call base.Render
    protected override void Render(HtmlTextWriter output)

    {

    this.SetInputType(); // Are we up level or down?

    this.GetClientScripts(); // register client scripts


    string sOutput = this.BuildControls();

    base.Render(output);

    output.Write(sOutput);

    }

    "Darren Clark" <> wrote in message
    news:%...
    >
    > I am writting server contorl that inherits from the TextBox.
    >
    > The problem is.... that my code that i want to be sent out is... but the
    > actual textbox is now
    >
    > sOutput contains the code that i want to be written out.... But how do i
    > tell it to write out the TextBox as well?
    > protected override void Render(HtmlTextWriter output)
    >
    > {
    >
    > this.SetInputType(); // Are we up level or down?
    >
    > this.GetClientScripts(); // register client scripts
    >
    >
    > string sOutput = this.BuildControls();
    >
    > output.Write(sOutput);
    >
    > }
    >
    >
     
    Darren Clark, Jun 19, 2004
    #2
    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. Scott Yenor
    Replies:
    0
    Views:
    387
    Scott Yenor
    Jan 22, 2004
  2. Replies:
    4
    Views:
    1,091
  3. Peter Mount
    Replies:
    4
    Views:
    975
    Peter Mount
    Jan 31, 2006
  4. William French

    rendering derived control from composite control

    William French, Dec 2, 2003, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    225
    Wayne
    Dec 3, 2003
  5. Bob Jones

    Composite control - sub control as a property not rendering

    Bob Jones, Apr 6, 2007, in forum: ASP .Net Web Controls
    Replies:
    4
    Views:
    252
    Bob Jones
    Apr 9, 2007
Loading...

Share This Page