Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 3rd, 2005, 7:13 PM   #1
see07
Programmer
 
Join Date: Oct 2004
Posts: 37
Rep Power: 0 see07 is on a distinguished road
Talking How to know if a place holder is empty

Hello:
In a web form I’m using a place holder, into it, which contains or not a web user control created ado with next code:

Example.Controls.C1lear();
Control control = this.Page.LoadControl("WebUserControl3.ascx");
Example.Controls.Add(control);

Where Example is my place holder.

Is there some way to ask if place holder contains a web user control or if it’s empty?

I’ll thank you your help.

A.L.
__________________
<span style='color:red'>El Hombre que tiene Amigos, debe mostrarse Amigo...</span>
see07 is offline   Reply With Quote
Old Mar 3rd, 2005, 8:09 PM   #2
bobc
Newbie
 
Join Date: Feb 2005
Posts: 16
Rep Power: 0 bobc is on a distinguished road
Loop through the controls in your place holder and increment a counter. If your counter is 0 then there are no controls on your place holder.

bobc
bobc is offline   Reply With Quote
Old Mar 4th, 2005, 2:50 PM   #3
see07
Programmer
 
Join Date: Oct 2004
Posts: 37
Rep Power: 0 see07 is on a distinguished road
Thanks you Bobc
__________________
<span style='color:red'>El Hombre que tiene Amigos, debe mostrarse Amigo...</span>
see07 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:20 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC