I have a dropdown which contains two option single choice, multiple choice and five dropdowns for answers which each contain two yes and no option.
I need a validation popup code like this if user select single choice then only one yes option will select and all other no. if he choose multiple choice then more than one yes can be select.
please provide code as soon as possible.
Thanks & Regards
sunakshi
Loading
ramesh natarajanPosted Jan 24, 2012, 5:17 AM
Please feel free to say you wanna code in JQuery or in Asp.Net?
If JQuery
I hope this will help:
"ChoiceList">"ChoiceList"id="ChoiceList"style="width:350px;">"Red">SingleChoice"Blue">MultipleChoice"SingleChoice">"SingleChoice"id="SingleChoice"style="width:350px;">"Red">Yes"Blue">No} if
($(this).val() == "MultipleChoice")) {
sunakshi saxenaPosted Jan 24, 2012, 5:09 AM
Alok UniyalPosted Jan 24, 2012, 4:59 AM
This is the code but it is without jquery.
protected void ddChoics_SelectedIndexChanged(object sender, EventArgs e)
{
if (ddChoice.SelectedItem.Value == "0")
{
ddChoice1.Enabled = true;
ddChoice2.Enabled = false;
ddChoice3.Enabled = false;
ddChoice4.Enabled = false;
ddChoice5.Enabled = false;
}
else
{
ddChoice1.Enabled = true;
ddChoice2.Enabled = true;
ddChoice3.Enabled = true;
ddChoice4.Enabled = true;
ddChoice5.Enabled = true;
}
}