modalpopup扩展器不能与asp.net 3.5一起使用 [英] modalpopup extender not working with asp.net 3.5
本文介绍了modalpopup扩展器不能与asp.net 3.5一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好,我的问题是我的ajax无法正常工作.即使它显示了弹出窗口,但对于
时间跨度较短.我在使用vs 2008.plz帮助时,我错在哪里.我无法跟踪问题.
hi all i have a problem that my ajax is not working properly.Even it shows the popup but for very
less time span.I am using vs 2008.plz help where am i wrong.I cant track the problem.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.style1
{
width: 80%;
}
.ModalPopupBG
{
background-color: #666699;
filter: alpha(opacity=50);
opacity: 0.7;
}
.HellowWorldPopup
{
min-width: 200px;
min-height: 150px;
background: white;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:ScriptManager ID="ScriptManager1" runat="server">
<table align="center" class="style1">
<tr>
<td>
<asp:Button ID="Button1" runat="server" Text="Button" />
<asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" BackgroundCssClass="ModalPopupBG"
PopupControlID="Panel1" TargetControlID="Button1" BehaviorID="ModalPopupExtender1">
</td>
</tr>
<tr>
<td>
<asp:Panel ID="Panel1" Style="display: none" runat="server">
<div class="HellowWorldPopup">
This is a simple modal dialog
</div>
</td>
</tr>
<tr>
<td>
</td>
</tr>
<tr>
<td>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
推荐答案
您将面板的display
属性设置为无
可能是您的问题
删除并尝试一次.
在div关闭后,关闭asp:panel
标记
You set thedisplay
property of panel as none
may be that is your problem
remove that and try once.
and after div close, close theasp:panel
tag
这篇关于modalpopup扩展器不能与asp.net 3.5一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文