Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Custom Class Properties
Message
De
19/08/2004 06:21:40
 
 
À
19/08/2004 01:12:56
Keith Payne
Technical Marketing Solutions
Floride, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00933621
Message ID:
00934433
Vues:
27
Hi, Keith,

Actually, the thread I referenced covered that. I had always done something like...
 if (oForm.Controls[nCtr]  is TextBox) 
{
	TextBox oText = (TextBox)oForm.Controls[nCtr];
	oText.Text = "test Textbox" + nCtr.ToString().Trim();
}
(Granted, it's C# code, and the question was posted as a VB.NET question)...

Bonnie Berent had read that using 'as' versus 'is' was more efficient, because a conversion was only being done once...


TextBox oText = oForm.Controls[nCtr] as TextBox
if (oText != null)
{
oText.Text = "test Textbox" + nCtr.ToString().Trim();
}


Kevin
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform