Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > User controls in a WebForm and pb with state of PlaceHolder

Reply
Thread Tools

User controls in a WebForm and pb with state of PlaceHolder

 
 
Yannis CORRE via .NET 247
Guest
Posts: n/a
 
      06-05-2004
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>
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
asp 1.1 : adding user controls to placeholder jason ASP .Net Web Controls 0 09-11-2006 04:40 AM
Losing state on bound controls in user controls Josh ASP .Net 1 03-23-2005 03:23 PM
getting controls from the placeholder controls collection msnews.microsoft.com ASP .Net 1 09-25-2004 11:19 PM
Build control in a placeholder or like a placeholder nail ASP .Net Building Controls 0 09-10-2004 07:57 PM
Dynamic Controls, Placeholder, Retrieve Information from Dynamic Controls Denny Smolinski via .NET 247 ASP .Net Web Controls 1 05-04-2004 09:15 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57