R
rufus
Hi,
I want to loop through the web controls on a web form and depending on
whether it is a textbox, checkbox etc perform an action.
I first tried a case statement:
Dim Cols As String() = {"vorName", "nachName", "sacked", "employeeID"}
Dim I As Integer
For I = 0 To 1
Select case E.Item.FindControl("edit_" & Cols(I)).getType()
Case System.Web.UI.WebControls.TextBox
' perform action
I found out that case statements only support the basic datatypes. Does
anyone know of a good way to do this?
Thanks in advance.
I want to loop through the web controls on a web form and depending on
whether it is a textbox, checkbox etc perform an action.
I first tried a case statement:
Dim Cols As String() = {"vorName", "nachName", "sacked", "employeeID"}
Dim I As Integer
For I = 0 To 1
Select case E.Item.FindControl("edit_" & Cols(I)).getType()
Case System.Web.UI.WebControls.TextBox
' perform action
I found out that case statements only support the basic datatypes. Does
anyone know of a good way to do this?
Thanks in advance.