2014-05-01 2 views
0

메인 마스터 페이지가 있으며 자바 스크립트 파일 (캘린더 응용 프로그램)이 포함되어 있습니다. 하지만 내가 기대하는대로 작동하지 않으며 어떤 행동을하지 않습니다. 어떤 해결책을 주시겠습니까? 및 masterpagemasterpage에서 자바 스크립트 파일을 사용할 수 없습니다.

=======================MasterPage file============================= 
    <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %> 
    <!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"> 
    <link href="js/datecss.css" rel="stylesheet" type="text/css" /> 
    <script type="text/javascript" language="javascript" src="datescript.js" ></script> 

    <link href="../css/templatemo_style.css" rel="stylesheet" type="text/css" /> 


    <link href="css/jquery.ennui.contentslider.css" rel="stylesheet" type="text/css" media="screen,projection" /> 
     <asp:ContentPlaceHolder ID="ContentPlaceHolder2" runat="server"> 
     </asp:ContentPlaceHolder> 
     <title>Untitled Page</title> 
     <style type="text/css"> 

      ul 
      { 
       list-style-type:none; 
      } 

      #navmenu 
      { 
       background-COLOR: Black; 
       width: 150PX; 


      } 
      .curv 
      { 

       -webkit-border-radius: 20px 20px 0px 0px; 
       -moz-border-radius: 20px 20px 0px 0px; 
       border-radius: 20px 20px 0px 0px; 
       behavior: url(PIE.htc); 

      } 
      .curv1 
      { 
       border:2px; 
       -webkit-border-radius: 20px; 
       -moz-border-radius: 20px; 
       border-radius: 20px; 
       behavior: url(PIE.htc); 
      } 

      .Mstyle2 
      { 
       height: 368px; 
      } 
      .Mstyle3 
      { 
       border:1px; 
       border-color:Gray; 
       height: 44px; 
       border-top:2px solid #00F; 
       background: #74DF00; 
       background: -webkit-gradient(linear, 0 0, 0 bottom, from(#74DF00), to(#0B3B0B)); 
       background: -webkit-linear-gradient(#74DF00, #0B3B0B); 
       background: -moz-linear-gradient(#74DF00, #0B3B0B); 
       background: -ms-linear-gradient(#74DF00, #0B3B0B); 
       background: -o-linear-gradient(#74DF00, #0B3B0B); 
       background: linear-gradient(#74DF00, #0B3B0B); 
       -pie-background: linear-gradient(#74DF00, #0B3B0B); 
       behavior: url(PIE.htc); 

      } 

      .Mstyle4 
      { 
       height: 5px; 
       border-color: Navy; 
       border:2px; 
       background: #2E9AFE; 
       background: -webkit-gradient(linear, 0 0, 0 bottom, from(#2E9AFE), to(#81DAF5)); 
       background: -webkit-linear-gradient(#2E9AFE, #81DAF5); 
       background: -moz-linear-gradient(#2E9AFE, #81DAF5); 
       background: -ms-linear-gradient(#2E9AFE, #81DAF5); 
       background: -o-linear-gradient(#2E9AFE, #81DAF5); 
       background: linear-gradient(#2E9AFE, #81DAF5); 
       -pie-background: linear-gradient(#2E9AFE, #81DAF5); 
       behavior: url(PIE.htc); 

       -webkit-border-radius: 1px; 
       -moz-border-radius: 1px; 
       border-radius: 1px; 
       behavior: url(PIE.htc); 
      } 

       .Mstyle9 
       { 
         border:2px solid; 

       border-color : #006699; 
       border :2px; 
       -webkit-border-radius: 20px 20px 0px 0px; 
       -moz-border-radius: 20px 20px 0px 0px; 
       border-radius: 20px 20px 0px 0px; 
       behavior: url(PIE.htc); 

       } 

       .Mstyle10 
       { 
       border: 1px solid #696; 
    padding: 60px 0; 
    text-align: center; width: 200px; 
    -webkit-border-radius: 20px; 
    -moz-border-radius: 20px; 
    border-radius: 20px; 
    background: #EEFF99; 
    behavior: url(PIE.htc); 
       } 



      .style1 
      { 
       height: auto; 
      } 
      .style2 
      { 
       border-style: none; 
       border-width: 2px; 
       border-color: inherit; 
       -webkit-border-radius: 20px 20px 0px 0px; 
       -moz-border-radius: 20px 20px 0px 0px; 
       border-radius: 20px 20px 0px 0px; 
       behavior: url(PIE.htc); 
       height: 100px; 
      } 






     </style> 
    </head> 
    <body bgcolor="black"> 
     <form id="form1" runat="server"> 
     <div> 

     </div> 
     <table align="center" border="0" width="900px" class="curv"; 
      style="border-spacing: 0px; empty-cells: ; caption-side: ""> 
     <tr width="900px"> 
      <td valign="middle" 
       align="center" width="900px" class="style2 curv1" height="130px" 


       style="border: medium solid #3366CC; padding: 0px; background-color: #336699;" > 

      <!-- <object width="900" height="130px" class="Mstyle9"> 
      <embed src="../image/headernew.swf" type="application/x-shockwave-flash" width="900px" height="130px" class="Mstyle9"></embed> 
     </object> 
    [endif]--> 
       <!--<div class="ethioCsdTs-flash-alt"><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></div> 
     <!--[if !IE]>--> 

     <!--<![endif]--> 

    <object id="flash" style="width: 900px; height: 130px;" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="900px" height="130px" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" align="centre"> 
    <param name="movie" value="../image/headernew.swf" /> 
    <param name="quality" value="high" /> 
    <param name="wmode" value="transparent"/> 
    <param name="bgcolor" value="#ffffff" /> <embed type="application/x-shockwave-flash" width="900px" height="130px" src="../image/headernew.swf" pluginspage="http://www.macromedia.com/go/getflashplayer" name="Web" bgcolor="#ffffff" quality="high"></embed> 
    </object> 

    <!--<object id="flash" style="width: 900px; height: 50px;" width="900px" height="50px" name="Web" data="../image/headernew.swf" type="application/x-shockwave-flash"> 
    <param name="movie" value="../image/headernew.swf" /> 
    <param name="quality" value="high" /> 
    <param name="bgcolor" value="#FFFFFF" /> 
    <param name="wmode" value="transparent" /> 
    </object> 
    <!--<![endif]--> 

     </td> </tr> 
     <tr> 

      <td valign="middle" 
       align="center" class="Mstyle4" bgcolor="blue" 
       style="border: thin double #0066CC; vertical-align: top;"> </td> </tr> 
      <tr> 

      <td width="900px" bgcolor="white" class="style1" height="auto" 

       style="border-style: solid; border-width: 0px thin thin thin; border-right-color: #C0C0C0; border-bottom-color: #C0C0C0; border-left-color: #C0C0C0; border-spacing: 0px; empty-cells: 0; caption-side: 0; border-collapse: 0; table-layout: 0;"> 
       <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"> 
       </asp:ContentPlaceHolder> 

      </td> 
     </tr> 
     <tr> 
      <td align="center" class="Mstyle3" bgcolor="blue"> 
       <span lang="en-us">TS TEAM TEP</span></td> 
     </tr> 
     </table> 

     </form> 
    </body> 
    </html> 


    ==========================The client file======================================== 
    <%@ Page Language="C#" MasterPageFile="~/AttendanceMasterPage.master" AutoEventWireup="true" CodeFile="FleetReportWithoutVehicle.aspx.cs" Inherits="FleetReportWithoutVehicle" Title="Untitled Page" %> 

    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder3" Runat="Server"> 

    <div> 
      <div> 
       &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
       Please Generate Attendance Follow Up Report Here<br /> 
      </div> 
      StartDate 
      <asp:TextBox ID="txtstartdate" runat="server"></asp:TextBox> 
      <a href="#" onclick="displayDatePicker('txtstartdate','','mdy');"> 
           <img src="calendar_view_day.png" alt="img" style="width:25px; height:25px; border:none" /></a>&nbsp;&nbsp; 
      <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
       ControlToValidate="txtstartdate" ErrorMessage="Please Select Start Date"></asp:RequiredFieldValidator> 
      End Date&nbsp; 
      &nbsp;<asp:TextBox ID="txtEndDate" runat="server" ReadOnly="false"></asp:TextBox> 
    <a href="#" onclick="displayDatePicker('txtEndDate','','mdy');"> 
           <img src="calendar_view_day.png" alt="img" style="width:25px; height:25px; border:none" /></a> 
    &nbsp;<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
       ControlToValidate="txtEndDate" ErrorMessage="Please Select End Date"></asp:RequiredFieldValidator> 
      <br /> 
      <br /> 
      <br /> 
      &nbsp;Select Office&nbsp;<asp:DropDownList ID="ddnOfficeLocation" 
       runat="server" DataSourceID="SqlDataSource3" DataTextField="OfficeLocationName" 
       DataValueField="OfficeLocationName"> 
      </asp:DropDownList> 
      <br /> 
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:SqlDataSource ID="SqlDataSource3" runat="server" 
       ConnectionString="<%$ ConnectionStrings:ATCF %>" 
       SelectCommand="SELECT DISTINCT * FROM [tblOfficeLocation]"> 
      </asp:SqlDataSource> 
      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 
      <asp:Button ID="btnSearch" runat="server" onclick="btnSearch_Click" 
       Text="Search" /> 
      <br /> 
      <br /> 
      <br /> 
      <asp:GridView ID="GridView1" runat="server" CellPadding="4" 
       DataSourceID="SqlDataSource1" ForeColor="#333333" GridLines="None" 
       AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"> 
       <RowStyle BackColor="#EFF3FB" /> 
       <Columns> 
        <asp:BoundField DataField="RouteName" HeaderText="RouteName" 
         SortExpression="RouteName" /> 
        <asp:BoundField DataField="NumberOfEmployee" HeaderText="NumberOfEmployee" 
         SortExpression="NumberOfEmployee" /> 
        <asp:BoundField DataField="OfficeLocationName" HeaderText="OfficeLocationName" 
         SortExpression="OfficeLocationName" /> 
        <asp:BoundField DataField="RequestDate" HeaderText="RequestDate" 
         SortExpression="RequestDate" /> 
       </Columns> 
       <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> 
       <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /> 
       <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" /> 
       <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> 
       <EditRowStyle BackColor="#2461BF" /> 
       <AlternatingRowStyle BackColor="White" /> 
      </asp:GridView> 
      <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
       ConnectionString="<%$ ConnectionStrings:ATCF %>" 

       SelectCommand="SELECT * FROM [viewFleetReportWithoutVehicleSummary] WHERE (([RequestDate] &gt;= @RequestDate) AND ([RequestDate] &lt;= @RequestDate2) AND ([OfficeLocationName] = @OfficeLocationName))"> 
       <SelectParameters> 
        <asp:ControlParameter ControlID="txtstartdate" DbType="Datetime" Name="RequestDate" 
         PropertyName="Text" /> 
        <asp:ControlParameter ControlID="txtEndDate" DbType="Datetime" Name="RequestDate2" 
         PropertyName="Text" /> 
        <asp:ControlParameter ControlID="ddnOfficeLocation" Name="OfficeLocationName" 
         PropertyName="SelectedValue" Type="String" /> 
       </SelectParameters> 
      </asp:SqlDataSource> 
      <br /> 
      Fleet Detail Report<br /> 
      <br /> 

     </div> 
     <div style="overflow:auto; height:200px;"> 
     <asp:GridView ID="gvDetailFleet" runat="server" DataSourceID="SqlDataSource2" 
      AllowSorting="True" AutoGenerateColumns="true" 
      DataKeyNames="OracleId" CellPadding="4" ForeColor="#333333" 
      GridLines="None"> 
      <RowStyle BackColor="#EFF3FB" /> 
      <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> 
      <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" /> 
      <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" /> 
      <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" /> 
      <EditRowStyle BackColor="#2461BF" /> 
      <AlternatingRowStyle BackColor="White" /> 

     </asp:GridView> 
     <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
      ConnectionString="<%$ ConnectionStrings:ATCF %>" 




       SelectCommand="SELECT [OracleId], [FirstName], [MiddleName], [LastName], [SectionName], [CoachGroupName], [RequestDate], [ShiftGroupName], [SubcityName], [OfficeLocationName], [RouteName], [SpecficLocation] FROM [ViewFleet] WHERE (([RequestDate] &gt;= @RequestDate) AND ([RequestDate] &lt;= @RequestDate2) AND ([OfficeLocationName] = @OfficeLocationName))"> 
      <SelectParameters> 
       <asp:ControlParameter ControlID="txtstartdate" DbType="Datetime" Name="RequestDate" 
        PropertyName="Text" /> 
       <asp:ControlParameter ControlID="txtEndDate" DbType="Datetime" Name="RequestDate2" 
        PropertyName="Text" /> 
       <asp:ControlParameter ControlID="ddnOfficeLocation" Name="OfficeLocationName" 
        PropertyName="SelectedValue" Type="String" /> 
      </SelectParameters> 
     </asp:SqlDataSource> 
      </div> 
     <br /> 
     <br /> 
     <asp:Button ID="btnFleetReportWithoutVehicle" runat="server" onclick="btnExportSalary_Click" 
      Text="Export Fleet Detail Report" /> 
     <br /> 
    </asp:Content> 

답변

0

대신 스크립트 관리자를 사용해야에서 지정된 JS를 사용하는 기준, CSS는 무엇인가, 이것 좀보십시오.

<asp:ScriptManager runat="server" ID="SM1"> 
    <Scripts> 
    <asp:ScriptReference Path="~/datescript.js" /> 
    </Scripts> 
</asp:ScriptManager> 

마스터 페이지에 추가하십시오.

MSDN 자세한 내용은이 링크를 참조하십시오.

+0

빠른 응답을 보내 주셔서 감사합니다. << Microsoft JScript 런타임 오류 : 'Sys'이 (가) 정의되지 않았습니다. '라는 메시지가 나타납니다. 스크립트 관리자를 사용하기위한 어떤 사전 요청이있을 수 있습니까? – Sapna

+0

프로젝트 참조에'System.Web.Extensions'을 추가해야합니다. 그렇지 않은 경우 추가해보십시오. – yogi

+0

님이 작동하지 않습니다. – Sapna

관련 문제