jQuery的日期選擇器是不是在用戶控件通過母版工作....掙扎了很多工作.....Jquery的日期時間選擇器不能與母版
母版
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!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>Master Page</title>
<link href="App_Themes/LMSTheme/Style.css" rel="stylesheet" type="text/css" />
<link type="text/css" rel="stylesheet" href="../App_Themes/LMSTheme/jquery-ui-1.8.16.custom.css" />
<script type="text/javascript" src="../Scripts/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="../Scripts/jquery-ui-1.8.16.custom.min.js"></script>
<script src="Scripts/ui.datepicker.js" type="text/javascript"></script>
<style>.Hide{ display:none;}</style>
</head>
<body>
<form id="form1" runat="server">
<div class="divcontent">
<table width="100%">
<tr height="400px" valign="top">
<td width="10px">
</td>
<td>
<asp:ContentPlaceHolder ID="WorkArea" runat="server">
</asp:ContentPlaceHolder>
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
這是我的用戶:
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="HRApproveSwipeLeave.ascx.cs"
Inherits="HRApproveSwipeLeave" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<link type="text/css" rel="stylesheet" href="../App_Themes/LMSTheme/jquery-ui-1.8.16.custom.css" />
<script type="text/javascript" src="../Scripts/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="../Scripts/jquery-ui-1.8.16.custom.min.js"></script>
<script src="../../Scripts/ui.datepicker.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function() {
$('#txtDate').datepicker({changeMonth: true,
changeYear: true});
});
</script>
<div class="demo">
<asp:TextBox ID="txtDate" runat="server"></asp:TextBox>
</div>
這是ASPX,而我叫thourgh母版頁.....
<%@ Page Language="C#" AutoEventWireup="true" Theme="LMSSkinFile" MasterPageFile="~/MasterPage.master" CodeFile="HRApprovSwipeLeave.aspx.cs" Inherits="HRApprovSwipeLeave" Title="ApproveSwipeLeave"%>
<%@ Register Src="UserControl/HRApproveSwipeLeave.ascx" TagName="HRApproveSwipeLeave" TagPrefix="LMS" %>
<asp:Content ID="LMS_HRApproveSwipeLeave" ContentPlaceHolderID="WorkArea" runat="Server">
<asp:UpdatePanel ID="UpdatePanel" runat="server" UpdateMode="Conditional">
<contenttemplate>
<table>
<tr>
<td class="BoldCopy">
<asp:Label ID="WelcomeUserName" runat="server" Visible="false"></asp:Label>
</td>
</tr>
</table>
<table>
<tr>
<td>
<asp:Label ID="ApproveSwipeLeave" Font-Bold=true ForeColor=red runat="server"></asp:Label>
</td>
</tr>
<tr>
<td>
<LMS:HRApproveSwipeLeave ID="LMSHRApproveSwipeLeave" runat="server" />
</td>
</tr>
</table>
</contenttemplate>
</asp:UpdatePanel>
</asp:Content>
注意:jquery時間選擇器,當我通過用戶控件運行時,它並不是在所有射擊..如果我創建一個示例aspx,並且它正在工作....我不會在哪裏更改代碼主頁或ascx或aspx..for你的參考我已發送three.please幫助解決...我正在挖這個很多.....
你確認您的document.ready()獲取調用? –
你的pblm是在調用jquery –
你說的「如果我創建一個樣本aspx並且它正在工作」的母版頁。你能發佈「sample aspx」嗎? –