Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I have created an application in Asp.net in which I have to used jquery calender. for these I have searched lot of jQuery examples. I got one good solution for this i got one site
"http://keith-wood.name/datepick.html[^]" from here I took two JS and css files.

In a simple page I tried it works fine, but when I implemented this in my project it is not working.

I am not understanding how to implement this.

<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/MasterLogin.Master"
    AutoEventWireup="true" CodeBehind="testjquery.aspx.cs" Inherits="PresentationLayer.testjquery" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolderCheckoutProcess"
    runat="server">

    <script type="text/javascript">
        $(function() {
            //	$.datepick.setDefaults({useThemeRoller: true});
            $('#popupDatepicker').datepick();
            $('#inlineDatepicker').datepick({ onSelect: showDate });
        });

        function showDate(date) {
            alert('The date chosen is ' + date);
        }
</script>

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

    <link href="css/jquery.datepick.css" rel="stylesheet" type="text/css" />

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

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

    <div>
        <p>
            A popup datepicker
            <input type="text" id="popupDatepicker"></p>
    </div>
</asp:Content>
Posted
Updated 23-Dec-09 9:29am
v4

1 solution

The first thing I'd do is try the same code in a plain vanilla aspx UI and see if works then. If it does, then try it in an ajax-enabled, but non-master-paged page. If it still works, then you know that something on the master page is your problem, not the jQuery script. On the other hand, if it fails on a straight aspx page, the problem is in the script you copied.
 
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