问题描述
你好,我是拉克什曼饶.我的网页包含模式弹出窗口,我编写如下代码:
Hi, I am lakshman rao. my web page contains modal popup, i write the code like this
<asp:ImageButton ID="ImageButton2" runat="server" onclick="ImageButton2_Click"
style="position:absolute; top: 175px; left: 523px;"
ImageUrl="~/pics/programs.jpg" />
<asp:Panel ID="pnlprog" runat="server" BackImageUrl="~/pics/programs pop.jpg" Width="800px" Height="500"
HorizontalAlign="NotSet" style="display:none; padding=0px;" BorderColor="Black" BorderStyle="None" BorderWidth="1px">
<asp:LinkButton ID="blk" runat="server" Text="* Balakuteer (Orphanage)" OnClick="blk_click" style="position:absolute; top:90px; left:590px;" Font-Size="Medium" ForeColor="#69A4B0" Font-Underline="False" Font-Bold="True"></asp:LinkButton>
</asp:Panel>
<ajaxtoolkit:ModalPopupExtender ID="mdlPopupProg" BehaviorID="mdlPopupProg" runat="server" TargetControlID="ImageButton2" PopupControlID="pnlprog" OkControlID="hlprog" BackgroundCssClass="modalBackground" />
<mb:ModalPopupAnimationExtender ID="ModalPopupAnimationExtender2"
runat="server" ModalPopupBehaviorID="mdlPopupProg" TargetControlID="pnlprog">
<Animations>
<OnShown>
<FadeIn Duration="1.5" Fps="20" />
</OnShown>
</Animations>
</mb:ModalPopupAnimationExtender>
这是使用的代码,但是在这里,当我尝试单击该modalpopup中的Linkbutton时,它将关闭modalpopup,如何在modalpopup中触发事件args.我想当我叮当Linkbutton时,无论blk_click中的代码将要执行什么.谁能指导我...
This is the code used, but Here when i am trying to click the Linkbutton in that modalpopup it closes the the modalpopup, How to fire event args in modalpopup. i want when i clink the Linkbutton what ever the code in the blk_click is to be execute. can any one guide me in this...
推荐答案
<cc1:modalpopupextender runat="server" id="mpeUserAccount1" targetcontrolid="btnUserAccount1" popupcontrolid="pnlUserAccount1" backgroundcssclass="modalBackground" behaviorid="mpeUserAccount1" xmlns:cc1="#unknown">
</cc1:modalpopupextender>
<asp:button runat="server" id="btnUserAccount1" style="display: none" xmlns:asp="#unknown" /> <asp:panel runat="server" cssclass="modalPopup" id="pnlUserAccount1" style="display: none;" xmlns:asp="#unknown">
Width="40%" Height="40%" BackColor="White">
<uc1:useraccount runat="server" id="ucUserAccount1" xmlns:uc1="#unknown" />
</asp:panel>
如果这对您有帮助,请给予感谢谢谢
give credit if this will help you
thanks
<asp:ImageButton ID="ImageButton2" runat="server" onclick="ImageButton2_Click"
style="position:absolute; top: 175px; left: 523px;"
ImageUrl="~/pics/programs.jpg" />
<asp:Panel ID="pnlprog" runat="server" BackImageUrl="~/pics/programs pop.jpg" Width="800px" Height="500"
HorizontalAlign="NotSet" style="display:none; padding=0px;" BorderColor="Black" BorderStyle="None" BorderWidth="1px">
<asp:LinkButton ID="blk" runat="server" Text="* Balakuteer (Orphanage)" OnClick="blk_click" style="position:absolute; top:90px; left:590px;" Font-Size="Medium" ForeColor="#69A4B0" Font-Underline="False" Font-Bold="True"></asp:LinkButton>
</asp:Panel>
<asp:button runat="server" id="btnShowModalPopup" style="display: none" xmlns:asp="#unknown" />
<ajaxtoolkit:ModalPopupExtender ID="mdlPopupProg" BehaviorID="mdlPopupProg" runat="server" TargetControlID="btnShowModalPopup" PopupControlID="pnlprog" OkControlID="hlprog" BackgroundCssClass="modalBackground" />
<mb:ModalPopupAnimationExtender ID="ModalPopupAnimationExtender2"
runat="server" ModalPopupBehaviorID="mdlPopupProg" TargetControlID="pnlprog">
<Animations>
<OnShown>
<FadeIn Duration="1.5" Fps="20" />
</OnShown>
</Animations>
</mb:ModalPopupAnimationExtender>
然后
在服务器站点上显示ModalPopupExtender:
写ImageButton2的点击事件
then
show ModalPopupExtender on server site:
write on click event of ImageButton2
ModalPopupExtender1.Show();
这篇关于modalpopup中的火灾事件args的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!