Click here to Skip to main content
15,924,402 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Design as follows

Course
For the below 3 dropdownlist (Exellent\Good\Poor) are there in the dropdownlist.
To What extent was this course useful Dropdownlist1(Exellent\Good\Poor)
To What extent equipment efficiency is user friendly Dropdownlist2(Exellent\Good\Poor)
Decision to have chosen our institute Dropdownlist3(Exellent\Good\Poor)

When i choose the Poor from the dropdownlist i want to show the Modalpopup Extender.

My code as follows
C#
protected void Dropdownlist1_SelectedIndexChanged(object sender, EventArgs e)
{
     if (Dropdownlist1.Text.ToString() == "Poor")
     {
         ModalPopupExtender1.Show();
         Pnlnegativefeedback.Visible = true;
         return;
     }
}


But when i run and click the Dropdownlist1 Modalpopup Extender is open. But i want the Modalpopup Extender to open only when i select the Poor from the Dropdownlist1.

from my above code what is the problem.

please help me.

Regards,
Narasiman P.
Posted
Updated 31-Oct-13 19:53pm
v2

1 solution

Change your condition

if (Dropdownlist1.Text.ToString() == "Poor")

To
if (Dropdownlist1.SelectedItem.Text.ToString() == "Poor")
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900