title: Jquery UI isn't loading in ASP.NET page
body: <p>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</p>
  
  <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %&gt;
  
  &lt;!DOCTYPE html&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head runat="server"&gt;
      &lt;title&gt; Movie Form&lt;/title&gt;
      &lt;style type="text/css"&gt;
          * {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;}
      &lt;/style&gt;
      &lt;!--[if gte IE 9]&gt;
        &lt;style type="text/css"&gt;
          .gradient {
             filter: none;
          }
        &lt;/style&gt;
      &lt;![endif]--&gt;    
          &lt;link type="text/css" href="css/ui-lightness/jquery-ui-1.8.18.custom.css" rel="stylesheet" /&gt;   
          &lt;script type="text/javascript" src="js/jquery-1.7.1.min.js"&gt;&lt;/script&gt;
          &lt;script type="text/javascript" src="js/jquery-ui-1.8.18.custom.min.js"&gt;&lt;/script&gt;    
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="form1" runat="server"&gt;
      &lt;div id="wrapper"&gt;
          &lt;div id="content" class="gradient"&gt;
              &lt;h1&gt;Movie &lt;strong&gt;Form&lt;/strong&gt;&lt;/h1&gt;
              &lt;asp:Table ID="Table1" runat="server" Width="380px"&gt;
                  &lt;asp:TableRow&gt;
                      &lt;asp:TableCell Width="45%"&gt;
                          &lt;span class="rqd"&gt;*&lt;/span&gt;&amp;nbsp;&lt;asp:Label ID="fNameLbl" runat="server" Text="First Name"&gt;&lt;/asp:Label&gt;
                      &lt;/asp:TableCell&gt;
                      &lt;asp:TableCell&gt;
                          &lt;asp:TextBox ID="fName" runat="server" Width="140px"&gt;&lt;/asp:TextBox&gt;
                          &lt;asp:RequiredFieldValidator ID="fNameRqd" ControlToValidate="fName" runat="server" Text="&amp;nbsp;&lt;img src='err.png' alt='*' title='Please enter your first name'&gt;" ErrorMessage="Please enter your first name"&gt;&lt;/asp:RequiredFieldValidator&gt;
                          &lt;asp:RegularExpressionValidator ID="fNameReg" ControlToValidate="fName" runat="server" ValidationExpression="^[\s\S]{0,40}$"  Text="&amp;nbsp;&lt;img src='err.png' alt='*' title='Your name can be no more than 40 characters'&gt;" ErrorMessage="Your name can be no more than 40 characters"&gt;&lt;/asp:RegularExpressionValidator&gt;
                      &lt;/asp:TableCell&gt;
                  &lt;/asp:TableRow&gt;
                  &lt;asp:TableRow&gt;
                      &lt;asp:TableCell&gt;
                          &lt;span class="rqd"&gt;*&lt;/span&gt;&amp;nbsp;&lt;asp:Label ID="address1lbl" runat="server" Text="Address Line 1"&gt;&lt;/asp:Label&gt;
                      &lt;/asp:TableCell&gt;
                      &lt;asp:TableCell&gt;
                          &lt;asp:TextBox ID="address1" runat="server" Width="140px"&gt;&lt;/asp:TextBox&gt;
                          &lt;asp:RequiredFieldValidator ID="address1Rqd" runat="server" ControlToValidate="address1" Text="&amp;nbsp;&lt;img src='err.png' alt='*' title='Please enter your address'&gt;" ErrorMessage="Please enter your address"&gt;&lt;/asp:RequiredFieldValidator&gt;
                          &lt;asp:RegularExpressionValidator ID="address1Reg" ControlToValidate="address1" runat="server" ValidationExpression="^[\s\S]{0,120}$"  Text="&amp;nbsp;&lt;img src='err.png' alt='*' title='Your address can be no more than 120 characters'&gt;" ErrorMessage="Your address can be no more than 120 characters"&gt;&lt;/asp:RegularExpressionValidator&gt;
                      &lt;/asp:TableCell&gt;
                  &lt;/asp:TableRow&gt;
                  &lt;asp:TableRow&gt;
                      &lt;asp:TableCell&gt;
                          &lt;span class="rqd"&gt;*&lt;/span&gt;&amp;nbsp;&lt;asp:Label ID="townlbl" runat="server" Text="Town/City"&gt;&lt;/asp:Label&gt;
                      &lt;/asp:TableCell&gt;
                      &lt;asp:TableCell&gt;
                          &lt;asp:TextBox ID="town" runat="server" Width="140px"&gt;&lt;/asp:TextBox&gt;
                          &lt;asp:RequiredFieldValidator ID="townRqd" runat="server" ControlToValidate="town" Text="&amp;nbsp;&lt;img src='err.png' alt='*' title='Please enter your Town/City'&gt;" ErrorMessage="Please enter your Town/City"&gt;&lt;/asp:RequiredFieldValidator&gt;
                          &lt;asp:RegularExpressionValidator ID="townReg" ControlToValidate="town" runat="server" ValidationExpression="^[\s\S]{0,76}$"  Text="&amp;nbsp;&lt;img src='err.png' alt='*' title='Your Town/City name can be no more than 76 characters'&gt;" ErrorMessage="Your Town/City name can be no more than 76 characters"&gt;&lt;/asp:RegularExpressionValidator&gt;
                      &lt;/asp:TableCell&gt;
                  &lt;/asp:TableRow&gt;
                  &lt;asp:TableRow&gt;
                      &lt;asp:TableCell&gt;
                          &lt;span class="rqd"&gt;*&lt;/span&gt;&amp;nbsp;&lt;asp:Label ID="postcodelbl" runat="server" Text="Postcode"&gt;&lt;/asp:Label&gt;
                      &lt;/asp:TableCell&gt;
                      &lt;asp:TableCell&gt;
                          &lt;asp:TextBox ID="postcode" runat="server" Width="140px"&gt;&lt;/asp:TextBox&gt;
                          &lt;asp:RequiredFieldValidator ID="postcodeRqd" runat="server" ControlToValidate="postcode" Text="&amp;nbsp;&lt;img src='err.png' alt='*' title='Please enter your Postcode'&gt;" ErrorMessage="Please enter your Postcode"&gt;&lt;/asp:RequiredFieldValidator&gt;
                          &lt;asp:RegularExpressionValidator ID="postcodeReg" runat="server" ControlToValidate="postcode" ValidationExpression="\d{4}" Text="&amp;nbsp;&lt;img src='err.png' alt='*' title='Your Postcode can only be 4 digits long'&gt;" ErrorMessage="Your Postcode can only be 4 digits long"&gt;&lt;/asp:RegularExpressionValidator&gt;
                      &lt;/asp:TableCell&gt;
                  &lt;/asp:TableRow&gt;
                  &lt;asp:TableRow&gt;
                      &lt;asp:TableCell&gt;
                          &lt;span class="rqd"&gt;*&lt;/span&gt;&amp;nbsp;&lt;asp:Label ID="emaillbl" runat="server" Text="Email"&gt;&lt;/asp:Label&gt;
                      &lt;/asp:TableCell&gt;
                      &lt;asp:TableCell&gt;
                          &lt;asp:TextBox ID="email" runat="server" Width="140px"&gt;&lt;/asp:TextBox&gt;
                          &lt;asp:RequiredFieldValidator ID="emailRqd" runat="server" ControlToValidate="email" Text="&amp;nbsp;&lt;img src='err.png' alt='*' title='Please enter your email'&gt;" ErrorMessage="Please enter your email"&gt;&lt;/asp:RequiredFieldValidator&gt;
                          &lt;asp:RegularExpressionValidator ID="emailReg" runat="server" ControlToValidate="email" ValidationExpression="^(?=.{0,100}$)\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$"  Text="&amp;nbsp;&lt;img src='err.png' alt='*' title='Please enter a valid email address less than 100 characters long'&gt;" ErrorMessage="Please enter a valid email address less than 100 characters long"&gt;&lt;/asp:RegularExpressionValidator&gt;
                      &lt;/asp:TableCell&gt;
                  &lt;/asp:TableRow&gt;
                  &lt;asp:TableRow&gt;
                      &lt;asp:TableCell&gt;
                          &lt;span class="rqd"&gt;*&lt;/span&gt;&amp;nbsp;&lt;asp:Label ID="phonelbl" runat="server" Text="Phone No."&gt;&lt;/asp:Label&gt;
                      &lt;/asp:TableCell&gt;
                      &lt;asp:TableCell&gt;
                          &lt;asp:TextBox ID="phone" runat="server" Width="140px"&gt;&lt;/asp:TextBox&gt;
                          &lt;asp:RequiredFieldValidator ID="phoneReq" runat="server" ControlToValidate="phone" Text="&amp;nbsp;&lt;img src='err.png' alt='*' title='Please enter your phone number'&gt;" ErrorMessage="Please enter your phone number"&gt;&lt;/asp:RequiredFieldValidator&gt;
                          &lt;asp:RegularExpressionValidator ID="phoneReg" runat="server" ControlToValidate="phone" ValidationExpression="\d{0,14}" Text="&amp;nbsp;&lt;img src='err.png' alt='*' title='Your phone number can be no longer than 14 digits'&gt;" ErrorMessage="Your phone number can be no longer than 14 digits"&gt;&lt;/asp:RegularExpressionValidator&gt;
                      &lt;/asp:TableCell&gt;
                  &lt;/asp:TableRow&gt;
                  &lt;asp:TableRow&gt;
                      &lt;asp:TableCell&gt;
                          &lt;span class="rqd"&gt;*&lt;/span&gt;&amp;nbsp;&lt;asp:Label ID="doblbl" runat="server" Text="D.O.B"&gt;&lt;/asp:Label&gt;&amp;nbsp;&lt;span style="font-style: italic; font-size: x-small;"&gt;(dd/mm/yyy)&lt;/span&gt;
                      &lt;/asp:TableCell&gt;
                      &lt;asp:TableCell&gt;
                          &lt;asp:TextBox ID="dob" runat="server" Width="140px" CssClass="datePicker"&gt;&lt;/asp:TextBox&gt;
                          &lt;asp:RequiredFieldValidator ID="dobRqd" runat="server" ControlToValidate="dob" Text="&amp;nbsp;&lt;img src='err.png' alt='*' title='Please enter your Date of Birth'&gt;" ErrorMessage="Please enter your Date of Birth"&gt;&lt;/asp:RequiredFieldValidator&gt;
                          &lt;asp:CompareValidator id="dateValidator" runat="server" Type="Date" Operator="DataTypeCheck" ControlToValidate="dob" Text="&amp;nbsp;&lt;img src='err.png' alt='*' title='Please enter a valid date in the format dd/mm/yyy'&gt;" ErrorMessage="Please enter a valid date in the format dd/mm/yyy"&gt;&lt;/asp:CompareValidator&gt;
                      &lt;/asp:TableCell&gt;
                  &lt;/asp:TableRow&gt;
                  &lt;asp:TableRow&gt;
                      &lt;asp:TableCell&gt;
                          &lt;span class="rqd"&gt;*&lt;/span&gt;&amp;nbsp;&lt;asp:Label ID="movielbl" runat="server" Text="Favourite Move"&gt;&lt;/asp:Label&gt;
                      &lt;/asp:TableCell&gt;
                      &lt;asp:TableCell&gt;
                          &lt;asp:DropDownList ID="movie" runat="server" Width="140px"&gt;
                              &lt;asp:ListItem&gt;We Bought a Zoo&lt;/asp:ListItem&gt;
                              &lt;asp:ListItem&gt;The Breakfast Club&lt;/asp:ListItem&gt;
                              &lt;asp:ListItem&gt;Puss in Boots&lt;/asp:ListItem&gt;
                          &lt;/asp:DropDownList&gt;
                          &lt;asp:RequiredFieldValidator ID="movieReq" runat="server" ControlToValidate="movie" Text="&amp;nbsp;&lt;img src='err.png' alt='*' title='Please pick a movie'&gt;" ErrorMessage="Please pick a movie"&gt;&lt;/asp:RequiredFieldValidator&gt;
                      &lt;/asp:TableCell&gt;
                  &lt;/asp:TableRow&gt;
                  &lt;asp:TableRow&gt;
                      &lt;asp:TableCell&gt;
                          &lt;span class="rqd"&gt;*&lt;/span&gt;&amp;nbsp;&lt;asp:Label ID="genderlbl" runat="server" Text="Gender"&gt;&lt;/asp:Label&gt;
                      &lt;/asp:TableCell&gt;
                      &lt;asp:TableCell&gt;
                          &lt;asp:DropDownList ID="gender" runat="server" Width="140px"&gt;
                              &lt;asp:ListItem Value="male"&gt;Male&lt;/asp:ListItem&gt;
                              &lt;asp:ListItem Value="female"&gt;Female&lt;/asp:ListItem&gt;
                          &lt;/asp:DropDownList&gt;
                          &lt;asp:RequiredFieldValidator ID="genderReq" runat="server" ControlToValidate="gender" Text="&amp;nbsp;&lt;img src='err.png' alt='*' title='Please pick a gender'&gt;" ErrorMessage="Please pick a gender"&gt;&lt;/asp:RequiredFieldValidator&gt;
                      &lt;/asp:TableCell&gt;
                  &lt;/asp:TableRow&gt;
              &lt;/asp:Table&gt; 
              &lt;div id="buttons"&gt;
                  &lt;asp:Button ID="submit" runat="server" Text="Submit" OnClick="Submit_Click" /&gt;&amp;nbsp;&lt;input type="reset" name="reset" value="Clear" id="reset" /&gt;
              &lt;/div&gt;
              &lt;asp:Label ID="resultLbl" runat="server"&gt;&lt;/asp:Label&gt;
              &lt;asp:ValidationSummary ID="ValidationSummary1" runat="server" /&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;/form&gt;    
      &lt;script&gt;
          $(function () {
              $(".datePicker").datepicker({
                  changeMonth: true,
                  changeYear: true,
                  showOn: "button",
                  buttonImage: "calendar.gif",
                  buttonImageOnly: true,
                  dateFormat: 'dd-mm-yy'
              });
          })();
  &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>CS File</p>
  
  <pre><code>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!";
          }
      }
  }
  </code></pre>
  
  <p>All the files are right, they are all there, it just won't show. Any ideas?</p>
  
  <p>I also tried the id in the script at the bottom as #&lt;%= dob.ClientID  %> as some people suggested but it just will not load.</p>