User controls in a WebForm and pb with state of PlaceHolder

Discussion in 'ASP .Net Web Controls' started by Yannis CORRE via .NET 247, Jun 5, 2004.

  1. Hello,

    I make 2 Web User Controls (wuc). I want to put them into a WebForm (aspx page).
    I drag'n drop the two ascx files into my WebForm.
    In one of my wucs, I used a PlaceHolder component to build a table.
    I want to switch my 2 wucs by clicking on 2 buttons.

    Here the code of the first button :
    MyUserControl1.Visible = true;
    MyUserControl2.Visible = false;

    And the code of the other one :
    MyUserControl1.Visible = false;
    MyUserControl2.Visible = true;

    It works, I but I don't see my table placed in the PlaceHolder.
    In fact, the number of controls in the PlaceHolder become zero.

    Am I obliged to build my table for each PageLoad ?
    Why the PlaceHolder does not do the same thing like a Label for example ? (I see a Label, but not the table)
    I thought that the PaceHolder kept the controls for each Visible on/off of my wucs...
    So, I have to put the DataSet into a Session variable ?
    There is no more issue to make persistent a DataSet ?

    Thanks.

    --------------------------------
    From: Yannis CORRE

    -----------------------
    Posted by a user from .NET 247 (http://www.dotnet247.com/)

    <Id>53kLq4I/YEuUEEcjp3QX2Q==</Id>
     
    Yannis CORRE via .NET 247, Jun 5, 2004
    #1
    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. msnews.microsoft.com
    Replies:
    1
    Views:
    480
    =?Utf-8?B?Q2hyaXMgTW9oYW4=?=
    Sep 26, 2004
  2. Josh
    Replies:
    1
    Views:
    554
    ashish
    Mar 23, 2005
  3. nail

    Build control in a placeholder or like a placeholder

    nail, Sep 10, 2004, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    369
  4. Denny Smolinski via .NET 247

    Dynamic Controls, Placeholder, Retrieve Information from Dynamic Controls

    Denny Smolinski via .NET 247, May 4, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    503
    Eidolon
    May 4, 2004
  5. jason

    asp 1.1 : adding user controls to placeholder

    jason, Sep 11, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    116
    jason
    Sep 11, 2006
Loading...

Share This Page