Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to check existence of control?
Message
De
24/12/2006 20:45:19
 
 
À
24/12/2006 20:38:54
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 2.0
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
MS SQL Server
Divers
Thread ID:
01180075
Message ID:
01180081
Vues:
23
Sorry, I guess I misunderstood your question the first time.

You can try spinnning through the Controls collection maybe?
foreach (Control o in this.Controls)
{
	if (o is MyControl)
	{
		// then it's been added already
	}
}
~~Bonnie



>Hi,
>Thank you for reply.
>Then, how could I know the control is already added to form or not?
>
>Thank you
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform