RadioButtonlist可见性问题 [英] RadioButtonlist visiblity issue
本文介绍了RadioButtonlist可见性问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的同学们,
我在这里使用drowpdown列表,我希望当我从下拉列表中选择Quotation时,单选按钮列表rblSelfPA应该可见.但这并没有使此单选按钮列表可见.
我无法把握问题的原因.请告诉我代码中的问题是什么.
受保护的 void ddlProgStatus_SelectedIndexChanged(对象发件人,EventArgs e)
{
如果(ddlProgStatus.SelectedIndex!= 0 )
{
如果(ddlProgStatus.SelectedItem.Text.Contain(Quotation))
{
rblSelfPA.Visible = true ;
}
其他
{
rblSelfPA.Visible = false ;
}
grdQuestions.Visible = true ;
BindGridStatusQuestions();
}
其他
{
grdQuestions.Visible = false ;
divOrderWon.Visible = false ;
}
}
解决方案
您调试了吗?执行何去何从? if-else是否可以按预期工作?
在这里,您没有在双引号中给出"Quotation",我假设如果您的应用程序正在运行,那么您必须将其定义为变量并设置一个值或在双qutoes中使用"Quotation"一词. />是,如果其他方法按预期工作.但是单选按钮列表在更改的所选索引上不可见.这是我实际上在双重Quetes中使用的代码.请帮助我
protected void ddlProgStatus_SelectedIndexChanged(object sender EventArgs e) { if (ddlProgStatus.SelectedIndex != 0) { if (ddlProgStatus.SelectedItem.Text.Contains("Quotation")) { rblSelfPA.Visible =true; } else { rblSelfPA.Visible = false; } grdQuestions.Visible = true; BindGridStatusQuestions(); } else { grdQuestions.Visible = false; divOrderWon.Visible = false; } }
Dear fellows,
I am using a drowpdown list here I want that when i select Quotation from the dropdown then the radio button list rblSelfPA should be visible. But it is not making this radio button list visible.
I am unable to grasp the problems reason. Please tell me what is problem in my code.
protected void ddlProgStatus_SelectedIndexChanged(object sender, EventArgs e) { if (ddlProgStatus.SelectedIndex != 0) { if(ddlProgStatus.SelectedItem.Text.Contain(Quotation)) { rblSelfPA.Visible =true; } else { rblSelfPA.Visible = false; } grdQuestions.Visible = true; BindGridStatusQuestions(); } else { grdQuestions.Visible = false; divOrderWon.Visible = false; } }解决方案Have you debugged it? Where does the execution goes? Does the if-else thing work as expected?
Out here you have not given ''Quotation'' in double quotes, i assume if your application is running then you must have defined this as a variable and set a value or used the Quotation word in double qutoes.
Yes if else works as expected. But the radiobuttonlist is not visible on the selectedindex changed. Here is the code which i have actualy used in double qutoes. Pleae help me out
protected void ddlProgStatus_SelectedIndexChanged(object sender EventArgs e) { if (ddlProgStatus.SelectedIndex != 0) { if (ddlProgStatus.SelectedItem.Text.Contains("Quotation")) { rblSelfPA.Visible =true; } else { rblSelfPA.Visible = false; } grdQuestions.Visible = true; BindGridStatusQuestions(); } else { grdQuestions.Visible = false; divOrderWon.Visible = false; } }
这篇关于RadioButtonlist可见性问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文