Click here to Skip to main content
Rate this: bad
good
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
0 Maciej Los 245
1 OriginalGriff 210
2 Manfred R. Bihy 190
3 CHill60 180
4 _Amy 155
0 OriginalGriff 7,445
1 Sergey Alexandrovich Kryukov 6,157
2 Maciej Los 3,774
3 Peter Leow 3,448
4 CHill60 2,702


Advertise | Privacy | Mobile
Web02 | 2.8.140721.1 | Last Updated 8 Nov 2012
Copyright © CodeProject, 1999-2014
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