HI fellas and girls,<BR><BR>Have kind of like a difficult question but first the code:<BR><BR>[code language="VB.NET"]<BR>Function CheckFields() As String<BR> Dim TheFields As New Control()<BR> Dim TheField As New Control()<BR> Dim strMessage As String<BR> TheFields = FieldsToCheck(TheFields)<BR> For Each TheField In TheFields.Controls<BR> If TypeOf TheField Is TextBox Then<BR> Dim TheTextBox As TextBox = TheField<BR> If TheTextBox.Text = "" Then<BR> strMessage += "- Please fill in a " + TheTextBox.ToolTip + "
"<BR> End If<BR> ElseIf TypeOf TheField Is DropDownList Then<BR> Dim cbo As DropDownList = TheField<BR> If cbo.SelectedIndex = 0 Then<BR> strMessage += "- " + cbo.Items(0).Text + "
"<BR> End If<BR> End If<BR> Next<BR> Return strMessage<BR>End Function<BR><BR>Function FieldsToCheck(ByVal TheFields As Control) As Control<BR> TheFields.Controls.Add(Me.txtTitle)<BR> TheFields.Controls.Add(Me.cboCountryID)<BR> Return TheFields<BR>End Function<BR>[/code]<BR><BR>I am basicly try to write 2 functions which validate controls on a ASP.NET page. It actually works pretty well butt.... My controls dissapear after I call FieldsToCheck() and thus also CheckFields(). They just are not send with the page to the client aymore, they dissapaer?????<BR><BR>huh? Anybody an idea why this is???<BR><BR>Thanks!