disabled dynamically added controls and postback

Discussion in 'ASP .Net Web Controls' started by djk, Nov 25, 2004.

  1. djk

    djk Guest

    Hi all!

    Please help me with the following real-trouble:

    - I have dynamically created controls on page
    - Everything works unless I set for some controls .Enabled = false

    In such a case stored value for the disabled control is lost (not sent by
    MSIE back to server).

    But it works for static controls.

    What's wrong?

    Thanks a lot

    djk
     
    djk, Nov 25, 2004
    #1
    1. Advertising

  2. You need to store the viewstate of dynamically created controls. There's a
    special placeholder control here that you can use. Just add your controls to
    it:

    http://www.denisbauer.com/ASPNETControls/DynamicControlsPlaceholder.aspx


    "djk" <> wrote in message
    news:%...
    > Hi all!
    >
    > Please help me with the following real-trouble:
    >
    > - I have dynamically created controls on page
    > - Everything works unless I set for some controls .Enabled = false
    >
    > In such a case stored value for the disabled control is lost (not sent by
    > MSIE back to server).
    >
    > But it works for static controls.
    >
    > What's wrong?
    >
    > Thanks a lot
    >
    > djk
    >
    >
     
    Ken Cox [Microsoft MVP], Nov 26, 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. NotYetaNurd
    Replies:
    1
    Views:
    467
    John Saunders
    Nov 7, 2003
  2. Matthew Smith

    Dynamically added controls and postback

    Matthew Smith, May 16, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    523
    =?Utf-8?B?Q2hyaXM=?=
    May 16, 2004
  3. Phil Winstanley [Microsoft MVP ASP.NET]

    Re: Dynamically added controls and postback

    Phil Winstanley [Microsoft MVP ASP.NET], May 16, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    436
    Phil Winstanley [Microsoft MVP ASP.NET]
    May 16, 2004
  4. djk
    Replies:
    2
    Views:
    362
  5. =?Utf-8?B?Q2hyaXN0aWFuIE51bmNpYXRv?=

    Confusion Over Postback, ViewState and Dynamically Added Controls

    =?Utf-8?B?Q2hyaXN0aWFuIE51bmNpYXRv?=, May 3, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    2,347
    Brock Allen
    May 3, 2005
Loading...

Share This Page