When user click the poor from dropdownlist i want to show the popup screen
My code as follows
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
if(DropDownList1.SelectedItem.ToString() == "Poor")
{
SetDropdowndetails("DropDownList1",1);
}
else
{
Pnlnegativefeedback.Visible = false;
}
}
protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)
{
if (DropDownList2.SelectedItem.ToString() == "Poor")
{
SetDropdowndetails("DropDownList2", 2);
}
else
{
Pnlnegativefeedback.Visible = false;
}
}
private void SetDropdowndetails(string Dropdownname, Int32 Dropdownid)
{
SelectedDropdown = Dropdownname.ToString();
hfnegativefeedback.Value = Dropdownid.ToString();
Negativepnlpopup();
}
private void Negativepnlpopup()
{
TxtNegativeFeedback.Text = "";
DataTable dt = new DataTable();
dt = (DataTable)ViewState["Remarks"];
if (ViewState["Remarks"] != null)
{
for (int i = 0; i < dt.Rows.Count; i++)
{
if (hfnegativefeedback.Value == dt.Rows[i][0].ToString())
{
TxtNegativeFeedback.Text = dt.Rows[i][1].ToString();
}
}
}
ModalPopupExtender1.TargetControlID = SelectedDropdown.ToString();
TxtNegativeFeedback.Focus();
ModalPopupExtender1.Show();
Pnlnegativefeedback.Visible = true;
}
when i click dropdownlist1 and select the poor from the dropdownlist1 the pop screen will de displayed.
But when i click dropdownlist2 and select the poor from the dropdownlsit2 the pop screen will not be displayed.
what code i written in dropdownlist1 the same code only written in dropdownlist2.
what is the problem in my above code.
regards,
Narasiman P.