retain controls added to placeholder during postback?

Discussion in 'ASP .Net' started by Mark, Jul 6, 2004.

  1. Mark

    Mark Guest

    I'm adding several controls (labels, etc.) to a placeholder programatically.
    I'd like the PlaceHolder to maintain these contents during postbacks without
    having to programmatically recreate their contents. Is there a way to do
    this?

    Thanks in advance.

    Mark
     
    Mark, Jul 6, 2004
    #1
    1. Advertising

  2. > I'd like the PlaceHolder to maintain these contents during postbacks
    without
    > having to programmatically recreate their contents. Is there a way to do
    > this?


    No. Whom do you expect to re-create their contents? It's either going to be
    your application or nobody.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    Big things are made up
    of lots of little things.

    "Mark" <> wrote in message
    news:...
    > I'm adding several controls (labels, etc.) to a placeholder

    programatically.
    > I'd like the PlaceHolder to maintain these contents during postbacks

    without
    > having to programmatically recreate their contents. Is there a way to do
    > this?
    >
    > Thanks in advance.
    >
    > Mark
    >
    >
     
    Kevin Spencer, Jul 6, 2004
    #2
    1. Advertising

  3. The contents must be recreated after postback one way or another.
    However, you can automate the process with techniques such as this:
    http://www.ftponline.com/vsm/2003_04/magazine/columns/aspnet/default_pf.aspx
    It discusses extending the panel control to help make such tasks easier.

    --
    I hope this helps,
    Steve C. Orr, MCSD, MVP
    http://Steve.Orr.net


    "Mark" <> wrote in message
    news:...
    > I'm adding several controls (labels, etc.) to a placeholder

    programatically.
    > I'd like the PlaceHolder to maintain these contents during postbacks

    without
    > having to programmatically recreate their contents. Is there a way to do
    > this?
    >
    > Thanks in advance.
    >
    > Mark
    >
    >
     
    Steve C. Orr [MVP, MCSD], Jul 6, 2004
    #3
    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. J Sahoo
    Replies:
    5
    Views:
    10,693
    Colnaghi
    May 25, 2007
  2. =?Utf-8?B?QW5nZWw=?=

    Postback on Controls added to placeholder

    =?Utf-8?B?QW5nZWw=?=, May 26, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    2,124
    William F. Robertson, Jr.
    May 26, 2004
  3. =?Utf-8?B?U2ltb24gV2FsbGlz?=

    Placeholder's controls disappear during postback

    =?Utf-8?B?U2ltb24gV2FsbGlz?=, Mar 9, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    1,200
    =?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN
    Mar 9, 2005
  4. Pål Andreassen

    Retain treeview state during navigation

    Pål Andreassen, Mar 10, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    4,740
    Ducati748
    Mar 27, 2008
  5. nail

    Build control in a placeholder or like a placeholder

    nail, Sep 10, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    346
Loading...

Share This Page