modalpopup中的火灾事件args [英] fire event args in modalpopup

查看:77
本文介绍了modalpopup中的火灾事件args的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,我是拉克什曼饶.我的网页包含模式弹出窗口,我编写如下代码:

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...

推荐答案

看到这种格式

see this format

<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


首先添加新按钮并将其设置为TargetControlID

first add new button and set it TargetControlID

<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();


使用display:none属性创建一个虚拟按钮.在modelpopup扩展程序中,将targetcontrolid设置为该虚拟按钮.
Create a dummy button with display:none property. In the modelpopup extender set targetcontrolid to that dummy button.


这篇关于modalpopup中的火灾事件args的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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