Hi All,<BR><BR>I&#039;m refering to the code in this article.<BR><BR>http://www.dnzone.com/ShowDetail.asp?NewsId=151<BR><BR>I&#039;m trying to do the same in VB.NET and I&#039;m having problems with procedure ProcessSurveyResults. I was hoping to get some help on fixing it. I would really appreciate.<BR><BR>Original C# Code:<BR>while (itr.MoveNext()) {<BR> // get the control name<BR> string controlName = itr.Current.GetAttribute("name", "");<BR> // append question information<BR> sb.Append(controlName);<BR> sb.Append(" : ");<BR> // get the control<BR> object ctrl = FindControl(controlName);<BR> // append the correct filled out information<BR> if (ctrl is TextBox) {<BR> sb.Append(((TextBox)ctrl).Text);<BR> }<BR> if (ctrl is RadioButtonList) {<BR> // the selected item might be null<BR> if (((RadioButtonList)ctrl).SelectedItem != null) {<BR> sb.Append(((RadioButtonList)ctrl).SelectedItem.Val ue);<BR> }<BR> }<BR> sb.Append(Environment.NewLine);<BR> }<BR><BR>VB.NET CODE:<BR> While itr.MoveNext()<BR> Dim controlName As String = itr.Current.GetAttribute("name", "")<BR> sb.Append(controlName)<BR> sb.Append(" : ")<BR> Dim ctrl As Object = FindControl(controlName)<BR> If TypeOf ctrl Is TextBox Then<BR> sb.Append(CType(ctrl, TextBox).Text)<BR> End If<BR> If TypeOf ctrl Is RadioButtonList Then<BR> If Not (CType(ctrl, RadioButtonList).SelectedItem Is Nothing) Then<BR> sb.Append(CType(ctrl, RadioButtonList).SelectedItem.Value)<BR> End If<BR> End If<BR> sb.Append(Environment.NewLine)<BR> End While<BR><BR>In VB when i debug the code inside the if statements (If TypeOf ctrl Is ..... Then) is not executed. Any idea on what i&#039;m doing wrong. It works fine in C#.<BR>