Hi,
I get a compile error Type "ctltype" is not defined with this code.
This is .NET 1.1 legacy code so not good I know.
Anyone know why??
Public Function GetControlText(ByVal ctls As Control, ByVal ctlname As String, ByVal ctltype As Type) As String
Dim ctl As Control
Dim res As String
ctl = ctls.FindControl(ctlname)
If ctl Is Nothing Then
Return ""
End If
res = CType(ctl, ctltype).Text
If res Is Nothing Then
Return ""
Else
Return res
End If
End Function