My code as follows
Value for course Fees & Time spent by student Dropdownlist1
In the dropdownlist selected item four values will be display as follows
Excellent
Good
Fair
Poor
In the above dropdownlist1 when we select the Poor only from the dropdownlist1 that time modalpopup extender popup will be display.
In the modalpopup extenderpopup one textbox will be there type for the Poor reason and click the ok button.
int currentddl = -1;
string SelectedDropdown = string.Empty;
protected void Dropdownlist1_SelectedIndexChanged(object sender, EventArgs e)
{
if (Dropdownlist1.SelectedItem.ToString() == "Poor")
{
ModalPopupExtender1.TargetControlID = "Dropdownlist1";
TxtNegativeFeedback.Text = "";
currentddl = 0;
SelectedDropdown = "ddlcourse";
hfnegativefeedback.Value = currentddl.ToString();
Negativepnlpopup();
Negativepnlpopupfalse();
}
}
private void Negativepnlpopup()
{
ModalPopupExtender1.TargetControlID = SelectedDropdown.ToString();
ModalPopupExtender1.Show();
Pnlnegativefeedback.Visible = true;
}
private void Negativepnlpopupfalse()
{
if (Dropdownlist1.SelectedItem.ToString() == "Excellent")
{
Pnlnegativefeedback.Visible = false;
return;
}
if (Dropdownlist1.SelectedItem.ToString() == "Very Good")
{
Pnlnegativefeedback.Visible = false;
return;
}
if (Dropdownlist1.SelectedItem.ToString() == "Good")
{
Pnlnegativefeedback.Visible = false;
return;
}
if (Dropdownlist1.SelectedItem.ToString() == "Fair")
{
pnlPopup.Visible = false;
return;
}
}
In the run mode when we select the Dropdownlist1 in that dorpdownlist1 suppose i select the Good that time modalpopupextender will show.
i don't want to display the modalpopupextender. only when i select the Poor in the dropdownlist1 that time only modalpopupextender will be visible.
for that i written the code.
But my code what is the mistake i made?
Please help me.
Regards,
narasiman P.