Function GetControlName(ByRef sender As System.Object) As String
If (sender Is Nothing) OrElse (Not TypeOf sender Is Control) Then
Return String.Empty
Else
Dim oCtrl As New Control
oCtrl = DirectCast(sender, Control)
Dim sRet As String = oCtrl.Name
oCtrl = Nothing
Return sRet
End If
End Function