Asp_Developer,
Thanks again for the personal message. However, I'd prefer that you continue discussion on the forum instead as it helps to manage the conversation and others can learn from your question.
You asked for more clarification on some of my suggestion.
If you would like more explanations on concepts found in my suggestion (such as delegates and generics) I'd recommend spending a little time searching for those terms. There is a search engine targeted specifically at .NET:
http://www.searchdotnet.com . This is actually a restricted google search created by Scott Guthrie. You should be able to find ample discussions on any .NET concept there that will be far superior to what I might type out in a few minutes. Here's an article I found on generics while checking
VB.NET syntax for the rest of my post:
http://www.ondotnet.com/pub/a/dotnet...vbnet_pt2.html
My apologies for not noticing that this was a
VB topic, here's the method signature I suggested above in its
VB.NET form (hopefully the generics are correct, I work in C#):
Public Sub ForEachControl(Of itemType)(ByVal controls As ControlCollection, ByVal doWork As ControlActionDelegate)
doWork would be a delegate (method pointer) to a method you create that does the work you wish to for the control type you want to act upon. I'm sorry I can't provide a good code example. I don't work in
VB.NET so I'd rather not mislead you with a bad example when you're likely to find some examples online by people who know
VB.NET generics better than me.
-Peter
compiledthoughts.com