Link to home
Create AccountLog in
Avatar of lapucca
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
Avatar of Gurvinder Pal Singh
Gurvinder Pal Singh
Flag of India image

@lapucca: could you please share a HTML only version of your problem?
Avatar of lapucca
lapucca

ASKER

Yeah, that is a good idea.  Thanks.
htmlCode.htm
which specific textboxes do you want to show or hide based on listbox selections?
Avatar of lapucca

ASKER

the control's id lbOtherExercise and txtOtherExercise.  Thank you.
SOLUTION
Avatar of Gurvinder Pal Singh
Gurvinder Pal Singh
Flag of India image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
ASKER CERTIFIED SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Avatar of lapucca

ASKER

Khan, you're correct.  I tried that code and exactly as you described.  Your script does work with multi-select.  Thank you both.