模态弹出窗口的问题 [英] problem with modal popup

查看:80
本文介绍了模态弹出窗口的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在modalpopup中使用ajax



我有modalpopup我有一个下拉列表。我点击按钮modalpopup是打开的。



我选择dropdownlist选项,事件不会触发,页面刷新。再次点击该下拉事件触发后的选项。

i have modalpopup by using ajax

in modalpopup i have one dropdownlist. i click button modalpopup is open.

i select dropdownlist option, event does not fired and page is refresh . again i click the option after that dropdown event fired.

推荐答案

将模型弹出更新面板,并使用触发器进行下拉选择的索引更改事件。会解决你的问题,







例子





Put your model pop in Update panel and use Trigger for the drop down selected index change event. will solve your problem,



Example


<asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel2" runat="server" CssClass="pnlAlign">
        <ContentTemplate>

 <asp:Button runat="server" ID="btnShowModalPopup" Style="display: none" />
                    <ajax:ModalPopupExtender ID="mpopRejectAndRework" runat="server" TargetControlID="btnShowModalPopup"

                        PopupControlID="divPopUp" BackgroundCssClass="modalBackground" DropShadow="true"

                        RepositionMode="RepositionOnWindowResize" />
</ContentTemplate>

 <asp:DropDownList ID="ddlStatus" runat="server" Width="200px" AutoPostBack="True" CssClass="input"

                                        OnSelectedIndexChanged="ddlStatus_SelectedIndexChanged">
                                    </asp:DropDownList>
  <Triggers>
            <asp:PostBackTrigger ControlID="ddlStatus" />
        </Triggers>
</asp:UpdatePanel>


这篇关于模态弹出窗口的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆