如何从代码后面填充模式弹出面板中的下拉列表 [英] How to populate dropdown in a modal popup panel from code behind
本文介绍了如何从代码后面填充模式弹出面板中的下拉列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在modalpopupextender的面板中有一个下拉列表ddlID。
我在btnFill按钮上点击一个arraylist点击。
然后我将arraylist分配给面板中的下拉菜单。
但它(下拉列表)仍为空白。但是,如果我将下拉放在面板外面,它会使用给定的数据进行渲染。
请帮助...
I have a dropdown "ddlID" in a panel in modalpopupextender.
I populate a arraylist on "btnFill" button click.
then i assign the arraylist to dropdown in the panel.
but it(dropdown) remains blank. But if i place the drop down outside the panel it renders with the given data.
please help...
protected void btnFill_Click(object sender, EventArgs e)
{
foreach (GridViewRow rw in gvGrid.Rows)
{
CheckBox chkBx = (CheckBox)rw.FindControl("chkSelect");
if (chkBx != null && chkBx.Checked)
{
HyperLink hpr = (HyperLink)rw.FindControl("hpr");
arlMyarylst.Add(hpr.Text.Trim());
}
}
ddlID.Datasource = arlMyarylst;
ddlID.dataBind();
mpeMyModal.Show();
}
推荐答案
你好,maverick12131。
我我不知道ASP.NET,但我发现Google上列出了一些文章。
服务器端代码的ModalPopupExtender [ ^ ]
http://stackoverflow.com/questions/2877551/asp-net-modalpopupextender-prevents-button-click-event-from-firing [ ^ ]
如果有帮助,我很高兴。
Hello, maverick12131.
I don't know about ASP.NET but I've found some articles listed on Google.
ModalPopupExtender from Server Side Code[^]
http://stackoverflow.com/questions/2877551/asp-net-modalpopupextender-prevents-button-click-event-from-firing[^]
If it helps your, I'm so glad.
请查看以下链接,希望这对你有帮助
http:// www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/ModalPopup/ModalPopup.aspx [ ^ ]
Please check below link, hope this would help you
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/ModalPopup/ModalPopup.aspx[^]
这篇关于如何从代码后面填充模式弹出面板中的下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文