有人能告诉我为什么这个代码工作没有母版页拒绝工作,当我使用嵌套母版页。基本母版页
中已经引用了必要的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 -->
检查如何引用库。它们是本地的还是从CDN加载的?我会使用Google的CDN
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.15/jquery-ui.min.js"></script>
为什么你应该使用CDN: http://encosia.com/2008/12/10/3-reasons-why-you-should-let-google-host-jquery-for-you/
还有另一篇关于Master Pages的好文章:http://odetocode.com/Articles/450.aspx
如果你正在使用本地引用,请查看这个问题以确保库被正确引用。