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. Advertising

  2. Martin

    Martin Guest

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

    in Render(...)



    "Martin" <> wrote in message
    news:...
    > 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
    #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. Leeor Chernov
    Replies:
    2
    Views:
    779
    Leeor Chernov
    Oct 16, 2005
  2. Replies:
    3
    Views:
    362
  3. Matt Sokol
    Replies:
    2
    Views:
    365
    Theo Tillotson
    Aug 7, 2003
  4. Cappy

    Repeater control in a rendered custom control

    Cappy, Jan 21, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    145
    Cappy
    Jan 21, 2004
  5. TJ
    Replies:
    4
    Views:
    351
    Steven Cheng[MSFT]
    Apr 7, 2006
Loading...

Share This Page