Click here to Skip to main content
12,349,911 members (22,823 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: ASP.NET
Hi All

I am developing application using ASP.Net, C# and JQuery. I am using JQuery to show datepicker with TextBox. Its working fin in my local system. I have tested so many times in local to ensure its work. But,Its not working after compile and pulish in to IIS 7. Following is the code i am using:

<head runat="server">
    <title></title>
    <script src="Scripts/jquery-1.4.2.js" type="text/javascript"></script>
    <link href="Scripts/jquery-ui.css" rel="stylesheet" type="text/css" />
    <script src="Scripts/jquery-ui.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
 
            var date = new Date();
            var currentMonth = date.getMonth();
            var currentDate = date.getDate();
            var currentYear = date.getFullYear();
 
            $('#txtToDate').datepicker({
                maxDate: new Date(currentYear, currentMonth, currentDate), dateFormat: 'yy-mm-dd'
            });
        });
    </script>
</head>
Posted 8-Nov-12 3:35am
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

JQuery is just a set of javascript libraries that run on the client, not the server. If everything works well on your local development environment, then it is likely that some of the relevant javascript scripts have not been published to your server properly. Ensure that all the javascript files exist in in the Scripts folder under the root of your site.
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

Just CHECK ONE TIME UR DEFAULT PAGE AND RIGHT CLICK ON THAT SEE THE INSPECT ELEMENT AND IF ANY ERROR THEN TELL WHAT IS THAT ...I THIS THERE WAS MISMATCH BETWEEN J QUERY AND AJAX. SCRIPTRESOURCE.AXD FILE
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

Did you check the script src path .
I think it may be having problem in SRC path attribute of the script tag
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160621.1 | Last Updated 8 Nov 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100