I have a VB Data Entry Web form
I need to switch most of the controls on this to read only under program control.
I can write code set each controls enabled property to false one at a time, but this seems a PITA to do for every form I write.
I need to be able to say make everything disabled apart from .........
I started with the following and then got stuck because the enabled property is not available for all objects.
I assume I have to make my code more specific using gettype, but I have no idea how to do this and I can find no examples on the web.
Can someone get me started
Many thanks
Dim item As System.Web.UI.Control
With Me.Controls
For Each item In Me.Controls
Dim mytype As String = item.GetType.ToString
Next