Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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:

XML
<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

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.
 
Share this answer
 
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
 
Share this answer
 
Did you check the script src path .
I think it may be having problem in SRC path attribute of the script tag
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900