Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Custom Class Properties
Message
From
19/08/2004 06:21:40
 
 
To
19/08/2004 01:12:56
Keith Payne
Technical Marketing Solutions
Florida, United States
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00933621
Message ID:
00934433
Views:
28
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
Previous
Reply
Map
View

Click here to load this message in the networking platform