lapucca
asked on
how to use jquery to hide or show label and textbox dep on a listbox selection?
Hi, I'm using asp.net 3.5 and C#
lbOtherExercise, listbox, allows multiple selection. If one of the selected value is 11 then I would like to show the label and textbox otherwise, hide them. Attached are my code. Thank you.
ManageAccounts.aspx
lbOtherExercise, listbox, allows multiple selection. If one of the selected value is 11 then I would like to show the label and textbox otherwise, hide them. Attached are my code. Thank you.
ManageAccounts.aspx
@lapucca: could you please share a HTML only version of your problem?
ASKER
Yeah, that is a good idea. Thanks.
htmlCode.htm
htmlCode.htm
which specific textboxes do you want to show or hide based on listbox selections?
ASKER
the control's id lbOtherExercise and txtOtherExercise. Thank you.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Khan, you're correct. I tried that code and exactly as you described. Your script does work with multi-select. Thank you both.