Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Undo checkbox on Validation error

Status
Not open for further replies.

EZEason

Programmer
Dec 11, 2000
213
0
0
US
I have a group of checkboxs that are created dynamically when the form loads. There could be 10 to 25 different check boxes depending on the results. I have a textbox with a RequiredFieldValidator set to watch it. When a user clicks a checkbox and the textbox is empty a validation error is displayed to stop the postback. Is there a way in identity whick checkbox was click, and there undo the action?

Jim

What doesn't kill you makes you stronger.
 
In your code behind file you can create a handler for the CheckedChanged event. Then, add the handler to each check box. In the handler code you can do somehting like this:
Code:
        If TypeOf sender Is CheckBox Then
            Dim cb As New CheckBox
            cb = sender
            Response.Write(cb.ID)
        End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top