Click here to Skip to main content
14,635,475 members
Rate this:
Please Sign up or sign in to vote.
See more:
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
Rate this:
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.
   
Rate this:
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
   
Rate this:
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
   

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



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