如何使用模式弹出窗口扩展程序加载aspx页面. [英] How to load an aspx page using the modal popup window extender.
本文介绍了如何使用模式弹出窗口扩展程序加载aspx页面.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个带有链接按钮link1的网格.
如果我单击link1,则另一个aspx页面必须
在模式弹出扩展器中打开.我还需要将值从网格传递到aspx页面.
谁能帮我这个.我厌倦了下面的代码,但是当我单击网格中的链接按钮时没有任何反应.
I have a grid with link button link1.
If i click on link1 another aspx page has to
get opened in the modal popup extender. I also need to pass value to the aspx page from the grid.
Can anyone help me with this. I tired the below code but nothing happens when i click the link button in grid.
<asp:Panel ID="pnlPopup" runat="server" CssClass="modalPopup" Width="600px" style="display:none;">
<asp:Button id="btnShowPopup" runat="server" >
<cc1:ModalPopupExtender ID="mdlPopup" runat="server" DropShadow="true"
TargetControlID="panel2" PopupControlID="btnShowPopup"
CancelControlID="buttonClose" PopupDragHandleControlID="panel2" />
<asp:Panel ID="panel2" runat="server" Height="400px" Width="400px" >
<iframe id="Iframe1" runat="server" width="800px" height="800px" src="LogAction.aspx" scrolling="auto" ></iframe></asp:Panel>
推荐答案
将以下javascript函数从网格中的链接按钮添加到onclick事件中
例如
Add the following javascript function to the onclick event from the linkbutton in the grid
eg
onclick="showModalPopup(); return false"
"return false"允许链接按钮不回发
The "return false" allows the linkbutton not to post back
<script type="text/javascript">
function showModalPopup() {
var modalPopupBehavior =
find(''mdlPopup''); modalPopupBehavior.show(); } </script>
find(''mdlPopup''); modalPopupBehavior.show(); } </script>
[edit]添加了预标签[/edit]
[edit] pre tags added [/edit]
这篇关于如何使用模式弹出窗口扩展程序加载aspx页面.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文