Migration to 2.0: Textbox readonly problem

Discussion in 'ASP .Net' started by Thierry, Jul 6, 2006.

  1. Thierry

    Thierry Guest

    Hi,
    We are currently upgrading our .Net web apps from framework 1.1 to 2.0
    Everything is going quite smoothly except a bug with textbox value not
    rendered when having propery readonly=true on the ASCX side.
    explaination:
    <asp:textbox id="TBDate" runat=server readonly=true></asp:textbox>
    after the upgrade to Framework 2.0, the value of this textbox is always
    empty string
    TBDate.value always equals ""

    The workaround we found is to set up the property on the vb side:
    TBDate.Attributes.add("readonly", "readonly")
    then the TBDate.value is well rendered on the postback...

    Did anyboby encounter the same problem?
    Does anybody has an explaination?

    Cheers,

    Thierry
     
    Thierry, Jul 6, 2006
    #1
    1. Advertising

  2. Thierry

    Teemu Keiski Guest

    Hi,

    I've blogged a small bit about it

    http://aspadvice.com/blogs/joteke/archive/2006/04/12/16409.aspx

    --
    Teemu Keiski
    ASP.NET MVP, AspInsider
    Finland, EU
    http://blogs.aspadvice.com/joteke

    "Thierry" <> wrote in message
    news:...
    > Hi,
    > We are currently upgrading our .Net web apps from framework 1.1 to 2.0
    > Everything is going quite smoothly except a bug with textbox value not
    > rendered when having propery readonly=true on the ASCX side.
    > explaination:
    > <asp:textbox id="TBDate" runat=server readonly=true></asp:textbox>
    > after the upgrade to Framework 2.0, the value of this textbox is always
    > empty string
    > TBDate.value always equals ""
    >
    > The workaround we found is to set up the property on the vb side:
    > TBDate.Attributes.add("readonly", "readonly")
    > then the TBDate.value is well rendered on the postback...
    >
    > Did anyboby encounter the same problem?
    > Does anybody has an explaination?
    >
    > Cheers,
    >
    > Thierry
    >
     
    Teemu Keiski, Jul 6, 2006
    #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. doug albright
    Replies:
    0
    Views:
    481
    doug albright
    Aug 30, 2003
  2. Angela Chen
    Replies:
    3
    Views:
    9,070
    parshuram
    Dec 6, 2004
  3. Replies:
    4
    Views:
    953
    Zoe Brown
    Sep 12, 2005
  4. Jonathan Hyatt
    Replies:
    1
    Views:
    2,016
    Jonathan Hyatt
    Jun 8, 2004
  5. Boni Satani
    Replies:
    0
    Views:
    179
    Boni Satani
    Jan 9, 2014
Loading...

Share This Page