ascx控件下拉列表 [英] ascx control dropdownlist
本文介绍了ascx控件下拉列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们可以为.ascx中的dropdown控件提供autopostback=true
吗?我已经提供了它,并且在页面加载时显示了页面,但没有显示控件.有人可以帮我吗?
谢谢...
can we give autopostback=true
for a dropdowncontrol in .ascx. I''ve provided it and when the page loads it shows the page but not control. Can anyone help me out?
Thanks...
推荐答案
尝试访问此 [ ^ ]链接..
可能会对您有所帮助.
Hi,
try visiting this[^] link..
It may help you..
<div style="display: table-cell; vertical-align: top">
<asp:UpdatePanel runat="server">
<ContentTemplate>
<asp:DropDownList ID="ddlItemType" runat="server" DataTextField="ItemTypeName" DataValueField="ItemTypeId"
ValidationGroup="vgLibItem" OnSelectedIndexChanged="ddlItemType_SelectedIndexChanged">
</asp:DropDownList>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="ddlItemType" EventName="SelectedIndexChanged" />
</Triggers>
</asp:UpdatePanel>
</div>
检查此链接.
ASP .NET中的用户控件 [
Hi,
check this link.
User controls in ASP .NET[^]
I think you have not registered the user control with the page. If you have added, try by adding the below line in Control directive of the user control.
<![CDATA[<%@ OutputCache Duration="1" Location="None" %>]]>
希望它能起作用.
hope it works.
这篇关于ascx控件下拉列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文