Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7660315
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:26:58+00:00 2026-05-31T13:26:58+00:00

I’m trying to assign the Jquery datepicker to an aspx page, but no matter

  • 0

I’m trying to assign the Jquery datepicker to an aspx page, but no matter how hard I try the Jquery just doesn’t seem to load. This is my pages code

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title> Movie Form</title>
    <style type="text/css">
        * {margin: 0; padding: 0; border: 0; line-height: -1; font-family: 'Arial Rounded MT', Verdana, Tahoma, sans-serif;}
        body {background: white url('bg.jpg') top left repeat-x;}
        h1 {color: white; margin-bottom: 8px;}
        #wrapper {margin: 0 auto; width: 450px;}
        #content {margin: 100px 0 20px 0; padding: 40px 20px; border: 10px solid white; width: 380px; background: #4ec0e5;background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzRlYzBlNSIgc3RvcC1vcGFjaXR5PSIxIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMzMjk2YjYiIHN0b3Atb3BhY2l0eT0iMSIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);background: -moz-linear-gradient(top, #4ec0e5 0%, #3296b6 100%);background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#4ec0e5), color-stop(100%,#3296b6));background: -webkit-linear-gradient(top, #4ec0e5 0%,#3296b6 100%);background: -o-linear-gradient(top, #4ec0e5 0%,#3296b6 100%);background: -ms-linear-gradient(top, #4ec0e5 0%,#3296b6 100%);background: linear-gradient(top, #4ec0e5 0%,#3296b6 100%);filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#4ec0e5', endColorstr='#3296b6',GradientType=0 );-moz-border-radius: 52px;border-radius: 52px;}
        .rqd {color: #f00;}
        #buttons{margin-top: 20px;text-align: center;}
        #submit, #reset {-moz-box-shadow:inset 0px 1px 0px 0px #ffffff;-webkit-box-shadow:inset 0px 1px 0px 0px #ffffff;box-shadow:inset 0px 1px 0px 0px #ffffff;background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #ededed), color-stop(1, #dfdfdf) );background:-moz-linear-gradient( center top, #ededed 5%, #dfdfdf 100% );filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ededed', endColorstr='#dfdfdf');background-color:#ededed;-moz-border-radius:6px;-webkit-border-radius:6px;border-radius:6px;border:1px solid #dcdcdc;display:inline-block;color:#777777;padding:6px 24px;text-decoration:none;text-shadow:1px 1px 0px #ffffff;}
        #submit:hover, #reset:hover {background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #dfdfdf), color-stop(1, #ededed) );background:-moz-linear-gradient( center top, #dfdfdf 5%, #ededed 100% );filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#dfdfdf', endColorstr='#ededed');background-color:#dfdfdf;}
        #ValidationSummary1 ul{list-style: none; margin: 10px 0 0 10px; font-size: smaller;color: white;}
        #ValidationSummary1 li{border-bottom: 1px solid red;}
        #resultLbl{margin: 10px 0 0 10px; font-size: smaller;color: white;}
    </style>
    <!--[if gte IE 9]>
      <style type="text/css">
        .gradient {
           filter: none;
        }
      </style>
    <![endif]-->    
        <link type="text/css" href="css/ui-lightness/jquery-ui-1.8.18.custom.css" rel="stylesheet" />   
        <script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
        <script type="text/javascript" src="js/jquery-ui-1.8.18.custom.min.js"></script>    
</head>
<body>
    <form id="form1" runat="server">
    <div id="wrapper">
        <div id="content" class="gradient">
            <h1>Movie <strong>Form</strong></h1>
            <asp:Table ID="Table1" runat="server" Width="380px">
                <asp:TableRow>
                    <asp:TableCell Width="45%">
                        <span class="rqd">*</span>&nbsp;<asp:Label ID="fNameLbl" runat="server" Text="First Name"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell>
                        <asp:TextBox ID="fName" runat="server" Width="140px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="fNameRqd" ControlToValidate="fName" runat="server" Text="&nbsp;<img src='err.png' alt='*' title='Please enter your first name'>" ErrorMessage="Please enter your first name"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="fNameReg" ControlToValidate="fName" runat="server" ValidationExpression="^[\s\S]{0,40}$"  Text="&nbsp;<img src='err.png' alt='*' title='Your name can be no more than 40 characters'>" ErrorMessage="Your name can be no more than 40 characters"></asp:RegularExpressionValidator>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell>
                        <span class="rqd">*</span>&nbsp;<asp:Label ID="address1lbl" runat="server" Text="Address Line 1"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell>
                        <asp:TextBox ID="address1" runat="server" Width="140px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="address1Rqd" runat="server" ControlToValidate="address1" Text="&nbsp;<img src='err.png' alt='*' title='Please enter your address'>" ErrorMessage="Please enter your address"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="address1Reg" ControlToValidate="address1" runat="server" ValidationExpression="^[\s\S]{0,120}$"  Text="&nbsp;<img src='err.png' alt='*' title='Your address can be no more than 120 characters'>" ErrorMessage="Your address can be no more than 120 characters"></asp:RegularExpressionValidator>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell>
                        <span class="rqd">*</span>&nbsp;<asp:Label ID="townlbl" runat="server" Text="Town/City"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell>
                        <asp:TextBox ID="town" runat="server" Width="140px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="townRqd" runat="server" ControlToValidate="town" Text="&nbsp;<img src='err.png' alt='*' title='Please enter your Town/City'>" ErrorMessage="Please enter your Town/City"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="townReg" ControlToValidate="town" runat="server" ValidationExpression="^[\s\S]{0,76}$"  Text="&nbsp;<img src='err.png' alt='*' title='Your Town/City name can be no more than 76 characters'>" ErrorMessage="Your Town/City name can be no more than 76 characters"></asp:RegularExpressionValidator>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell>
                        <span class="rqd">*</span>&nbsp;<asp:Label ID="postcodelbl" runat="server" Text="Postcode"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell>
                        <asp:TextBox ID="postcode" runat="server" Width="140px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="postcodeRqd" runat="server" ControlToValidate="postcode" Text="&nbsp;<img src='err.png' alt='*' title='Please enter your Postcode'>" ErrorMessage="Please enter your Postcode"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="postcodeReg" runat="server" ControlToValidate="postcode" ValidationExpression="\d{4}" Text="&nbsp;<img src='err.png' alt='*' title='Your Postcode can only be 4 digits long'>" ErrorMessage="Your Postcode can only be 4 digits long"></asp:RegularExpressionValidator>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell>
                        <span class="rqd">*</span>&nbsp;<asp:Label ID="emaillbl" runat="server" Text="Email"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell>
                        <asp:TextBox ID="email" runat="server" Width="140px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="emailRqd" runat="server" ControlToValidate="email" Text="&nbsp;<img src='err.png' alt='*' title='Please enter your email'>" ErrorMessage="Please enter your email"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="emailReg" runat="server" ControlToValidate="email" ValidationExpression="^(?=.{0,100}$)\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$"  Text="&nbsp;<img src='err.png' alt='*' title='Please enter a valid email address less than 100 characters long'>" ErrorMessage="Please enter a valid email address less than 100 characters long"></asp:RegularExpressionValidator>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell>
                        <span class="rqd">*</span>&nbsp;<asp:Label ID="phonelbl" runat="server" Text="Phone No."></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell>
                        <asp:TextBox ID="phone" runat="server" Width="140px"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="phoneReq" runat="server" ControlToValidate="phone" Text="&nbsp;<img src='err.png' alt='*' title='Please enter your phone number'>" ErrorMessage="Please enter your phone number"></asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="phoneReg" runat="server" ControlToValidate="phone" ValidationExpression="\d{0,14}" Text="&nbsp;<img src='err.png' alt='*' title='Your phone number can be no longer than 14 digits'>" ErrorMessage="Your phone number can be no longer than 14 digits"></asp:RegularExpressionValidator>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell>
                        <span class="rqd">*</span>&nbsp;<asp:Label ID="doblbl" runat="server" Text="D.O.B"></asp:Label>&nbsp;<span style="font-style: italic; font-size: x-small;">(dd/mm/yyy)</span>
                    </asp:TableCell>
                    <asp:TableCell>
                        <asp:TextBox ID="dob" runat="server" Width="140px" CssClass="datePicker"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="dobRqd" runat="server" ControlToValidate="dob" Text="&nbsp;<img src='err.png' alt='*' title='Please enter your Date of Birth'>" ErrorMessage="Please enter your Date of Birth"></asp:RequiredFieldValidator>
                        <asp:CompareValidator id="dateValidator" runat="server" Type="Date" Operator="DataTypeCheck" ControlToValidate="dob" Text="&nbsp;<img src='err.png' alt='*' title='Please enter a valid date in the format dd/mm/yyy'>" ErrorMessage="Please enter a valid date in the format dd/mm/yyy"></asp:CompareValidator>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell>
                        <span class="rqd">*</span>&nbsp;<asp:Label ID="movielbl" runat="server" Text="Favourite Move"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell>
                        <asp:DropDownList ID="movie" runat="server" Width="140px">
                            <asp:ListItem>We Bought a Zoo</asp:ListItem>
                            <asp:ListItem>The Breakfast Club</asp:ListItem>
                            <asp:ListItem>Puss in Boots</asp:ListItem>
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator ID="movieReq" runat="server" ControlToValidate="movie" Text="&nbsp;<img src='err.png' alt='*' title='Please pick a movie'>" ErrorMessage="Please pick a movie"></asp:RequiredFieldValidator>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell>
                        <span class="rqd">*</span>&nbsp;<asp:Label ID="genderlbl" runat="server" Text="Gender"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell>
                        <asp:DropDownList ID="gender" runat="server" Width="140px">
                            <asp:ListItem Value="male">Male</asp:ListItem>
                            <asp:ListItem Value="female">Female</asp:ListItem>
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator ID="genderReq" runat="server" ControlToValidate="gender" Text="&nbsp;<img src='err.png' alt='*' title='Please pick a gender'>" ErrorMessage="Please pick a gender"></asp:RequiredFieldValidator>
                    </asp:TableCell>
                </asp:TableRow>
            </asp:Table> 
            <div id="buttons">
                <asp:Button ID="submit" runat="server" Text="Submit" OnClick="Submit_Click" />&nbsp;<input type="reset" name="reset" value="Clear" id="reset" />
            </div>
            <asp:Label ID="resultLbl" runat="server"></asp:Label>
            <asp:ValidationSummary ID="ValidationSummary1" runat="server" />
        </div>
    </div>
    </form>    
    <script>
        $(function () {
            $(".datePicker").datepicker({
                changeMonth: true,
                changeYear: true,
                showOn: "button",
                buttonImage: "calendar.gif",
                buttonImageOnly: true,
                dateFormat: 'dd-mm-yy'
            });
        })();
</script>
</body>
</html>

CS File

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Submit_Click(object sender, EventArgs e)
    {
        if (Page.IsValid)
        {
            resultLbl.Text = "Congratulations this is valid data!";
        }
    }
}

All the files are right, they are all there, it just won’t show. Any ideas?

I also tried the id in the script at the bottom as #<%= dob.ClientID %> as some people suggested but it just will not load.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T13:26:58+00:00Added an answer on May 31, 2026 at 1:26 pm

    Have you tried declaring the jquery script reference first?

    <script type="text/javascript" src="Scripts/jquery-1.7.1.min.js"></script>
    <script type="text/javascript" src="Scripts/jquery-ui-1.8.18.custom.min.js"></script>
    

    Update! As I said in the comments below, I got it working, just had to remove the line:

    showOn: "button"
    

    Working

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
I am reading a book about Javascript and jQuery and using one of the
I am trying to render a haml file in a javascript response like so:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.