Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fastest way to scan for textbox controls
Message
From
10/12/2012 18:39:20
 
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01559234
Message ID:
01559270
Views:
73
This message has been marked as a message which has helped to the initial question of the thread.
Rick's suggestion, in addition to being faster, will also work with subclasses of textbox.

You can also try the one line Linq version (untested):
loHtmlForm.Controls.OfType(Of System.Web.UI.WebControls.TextBox)() _
.ToList() _
.ForEach(Function(loTextbox) loTextbox.Attributes.Add("onkeypress", "FormKeyPress(event)"))
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform