What do u think is wrong in this code???
no textbox is being affected :(
        For Each ctrl As Control In Panel1.Controls

            If ctrl Is GetType(TextBox) Then
                CType(ctrl, TextBox).Text = ""
            End If
        Next

There's really not enough code to know what's going on here. Is this for an ASP website?

Also, have you put a breakpoint in to see if the code is executing?

You might need to do "autopostback" on the button you're using to execute this code. It might be working, but if the page isn't postback'ed it won't display the changes.

Am I on the right track here?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.