【发布时间】:2011-08-09 09:18:13
【问题描述】:
谁能告诉我为什么当我使用嵌套母版页时,这段没有母版页的代码会拒绝工作。基本母版页中已引用了必要的 jquery js 文件
<%@ Page Title="" Language="C#" MasterPageFile="~/Detail.master" AutoEventWireup="true"
CodeBehind="FieldWorkerDetail.aspx.cs" Inherits="FoodVault.Web.WebForms.Admin.FieldWorkerDetail" %>
<%@ Register Assembly="RepeaterPager" Namespace="RepeaterPager" TagPrefix="fv" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="LeftContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script type="text/javascript"> // a workaround for a flaw in the demo system (http://dev.jqueryui.com/ticket/4375), ignore!
function Show()
{
$("#dialog-message").dialog({
modal: true,
buttons: {
Ok: function () {
$(this).dialog("close");
}
}
});
$("#dialog-message").dialog("open");
}
</script>
<div class="demo">
<input id="Button1" type="button" value="button" onclick="Show()" />
<div id="dialog-message" title="Download complete">
<p>
<span class="ui-icon ui-icon-circle-check" style="float:left; margin:0 7px 50px 0;"></span>
Your files have downloaded successfully into the My Downloads folder.
</p>
<p>
Currently using <b>36% of your storage space</b>.
</p>
</div>
<!-- Sample page content to illustrate the layering of the dialog -->
<div class="hiddenInViewSource" style="padding:20px;">
<p>Sed vel diam id libero <a href="http://example.com">rutrum convallis</a>. Donec aliquet leo vel magna. Phasellus rhoncus faucibus ante. Etiam bibendum, enim faucibus aliquet rhoncus, arcu felis ultricies neque, sit amet auctor elit eros a lectus.</p>
<form>
<input value="text input" /><br />
<input type="checkbox" />checkbox<br />
<input type="submit" onclick="Show()" />radio<br />
<select>
<option>select</option>
</select><br /><br />
<textarea>textarea</textarea><br />
</form>
</div><!-- End sample page content -->
</div><!-- End demo -->
【问题讨论】:
-
您能否提供更多关于具体是什么错误的详细信息...不要让我们猜测 :-)
-
另外,请从您的母版页中添加一个示例,说明您是如何引用这些库的
-
在母版页中有 Show() 函数是不是有点傻?
标签: jquery asp.net user-interface