我试图在 asp.net 页面上单击一个按钮后出现一个 modalpopup。
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="TestFile.ascx.cs" Inherits="TestFile" %>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="System.IO" %>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>jQuery UI Example Page</title>
<link type="text/css" href="css/ui-lightness/jquery-ui-1.8.21.custom.css" rel="stylesheet" />
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.21.custom.min.js"></script>
<script type="text/javascript">
function fnmodalpopup() {
$( "#dialog-modal" ).dialog({
height: 140,
modal: true
});
</script>
</head>
<!--Misc functions for operations -->
<script runat="server" type="text/javascript">
</script>
<div id="dialog-modal" title="Basic modal dialog">
<p>Adding the modal overlay screen makes the dialog look more prominent because it dims out the page content.</p>
</div>
<asp:Button ID="Button1" runat="server" Text="Button" />
我正在尝试创建一个与http://jqueryui.com/demos/dialog/#modal完全相同的对话框,但通过单击按钮以 asp.net 形式触发。页面闪烁,什么也没有出现。
任何反馈都会非常有帮助!