Rendered Control questions

Discussion in 'ASP .Net Web Controls' started by Martin, Oct 10, 2004.

  1. Martin

    Martin Guest

    Hi,

    I'm writing a rendered control to display either a plain text (in a span
    element), or an edit box, (in an input element) according to the control
    attribute ReadOnly.

    Fundamentally I have the runtime behaviour I want.
    I have 2 questions:
    1) How do I control the size of the rendered control at design time, and run
    time?
    2) I have noticed that in Render method, if I say output.RenderTag("INPUT"),
    the input element is still written in lower case. Is that correct
    behaviour, or something more sinister?

    Thanks
    Martin
     
    Martin, Oct 10, 2004
    #1
    1. Advertisements

  2. Martin

    Martin Guest

    Answer to 1) is
    output.AddStyleAttribute("Width",this.Width.ToString());

    in Render(...)
     
    Martin, Oct 10, 2004
    #2
    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.