Wrox Programmer Forums
|
ASP.NET 1.x and 2.0 Application Design Application design with ASP.NET 1.0, 1.1, and 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.x and 2.0 Application Design section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 3rd, 2005, 08:26 PM
Authorized User
 
Join Date: Dec 2004
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.

El Hombre que tiene Amigos ha de mostrarse Amigo
__________________
El Hombre que tiene Amigos ha de mostrarse Amigo
 
Old March 4th, 2005, 03:44 AM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 326
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to Santhi Send a message via MSN to Santhi
Default

You can achieve this by using Example.Controls.Count

 
Old March 4th, 2005, 04:43 PM
Authorized User
 
Join Date: Dec 2004
Posts: 40
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It's working through: Examples.HasControls(), or Examples.Controls.Count

El Hombre que tiene Amigos ha de mostrarse Amigo





Similar Threads
Thread Thread Starter Forum Replies Last Post
Place Holder Manoj Bisht ASP.NET 1.x and 2.0 Application Design 3 October 24th, 2007 08:52 AM
Scrollbars for ContentPlace Holder??? sivavenu BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 August 23rd, 2007 04:40 AM
Accessing Holder<T> in JAX-WS is rocket science?!? ypomonh J2EE 0 July 17th, 2007 09:32 AM
Cleaning a Place Holder from a class see07 ASP.NET 1.x and 2.0 Application Design 4 March 15th, 2005 12:28 PM
Logging in from another place Hadware General .NET 0 December 14th, 2004 03:39 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.