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" <> 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. Advertisements

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. Sean Gamino
    Replies:
    1
    Views:
    331
    John Saunders
    Jul 21, 2003
  2. Sam Martin
    Replies:
    4
    Views:
    7,912
    William F. Robertson, Jr.
    Sep 15, 2004
  3. =?Utf-8?B?UG9rZXJKb2tlcg==?=

    Set webcontrol properties before control is rendered?

    =?Utf-8?B?UG9rZXJKb2tlcg==?=, Oct 1, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    493
    Scott Allen
    Oct 2, 2004
  4. Leeor Chernov
    Replies:
    2
    Views:
    946
    Leeor Chernov
    Oct 16, 2005
  5. Replies:
    3
    Views:
    475
  6. Matt Sokol
    Replies:
    2
    Views:
    607
    Theo Tillotson
    Aug 7, 2003
  7. Cappy

    Repeater control in a rendered custom control

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