2012-01-24 42 views
1

enter image description herejQuery的日期选择器在Visual Studio不工作2010

大家好我已经做了关于visual studio 2010date picker这是在VS2005VS2008做工精细工作..

我的样本设计

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %> 

<!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></title> 
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> 

    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script> 

    <script type="text/javascript" src="js/jquery.datepick.js"></script> 

    <style type="text/css"> 
     @import "css/jquery.datepick.css"; 
    </style> 

    <script type="text/javascript"> 
     $(document).ready(function() { 
      $('<%= txtHiredate.ClientID %>').datepick({ showOnFocus: false, showTrigger: '#calImg' }); 
     }); 
    </script> 

    <script type="text/javascript"> 
     $(document).ready(function() { 
      $('<%= txtDateofBirth.ClientID %>').datepick({ showOnFocus: false, showTrigger: '#Img1' }); 
     }); 
    </script> </head> <body> 
    <form id="form1" runat="server"> 
    <div> 
    <asp:Button ID="Button1" runat="server" Text="Button" ValidationGroup="personal" 
     Style="left: 459px; position: absolute; top: 171px" /> 
       <asp:Label ID="lblDate" runat="Server" Text="HireDate" style="left: 321px; position: absolute; top: 98px"></asp:Label> 

    <asp:Label style="LEFT: 310px; POSITION: absolute; TOP: 133px" id="Label1" runat="Server" Text="DateofBirth"></asp:Label> 
       <asp:TextBox ID="txtHiredate" runat="server" ValidationGroup="personal" Style="left: 397px; 
        position: absolute; top: 96px" /> 


       <div style="display: none;"> 
        <img id="calImg" src="images/calendar.gif" alt="Popup" class="trigger" style="left: 564px; 
         position: absolute; top: 101px" /> 
       </div> 

    <asp:TextBox ID="txtDateofBirth" runat="server" ValidationGroup="personal" Style="left: 398px; 
     position: absolute; top: 131px" /> 
    <asp:CustomValidator ID="CustomValidator1" runat="server" ClientValidationFunction="validatehiredate" 
     ControlToValidate="txtDateofBirth" ValidationGroup="personal" Display="Dynamic" 
     Style="left: 596px; position: absolute; top: 132px">can not hire guy less than 18 yrs</asp:CustomValidator> 
    <div style="display: none;"> 
     <img id="Img1" src="images/calendar.gif" alt="Popup" class="trigger" style="left: 568px; 
      position: absolute; top: 136px" /> 
    </div> 
    </form> </body> </html> 

但是,当我在Vs2010打开vs2005解决方案,如果我点击关于web.config消息引发好吧,运行这是工作正常。但是,如果我创建了一个新的解决方案,并在此工作它没有显示相应的图像..任何一个可以帮助我..

+0

什么是“关于web.config文件信息”? – jrummell

+0

自带当我们试图以更高版本打开低版本的消息 – Chaitanya

回答

0

尝试按以下

$('<%= txtHiredate.ClientID %>') 
$('<%= txtDateofBirth.ClientID %>') 

$('#<%= txtHiredate.ClientID %>') 
$('#<%= txtDateofBirth.ClientID %>')