How to use JQuery Validation in ASP.NET Content form
<p>I have an asp.net content form which contains a couple of textboxes. I need to implement JQuery required field validation for these textboxes. Giving Code below, I can't figure it out how exactly it can be done using JQuery. Even after spending some time googling, I feel confused. Thanks for your help in advance</p>

<pre><code>&lt;%@ MasterType VirtualPath="~/Shared/Module.master" %&gt;

&lt;%@ Page MasterPageFile="~/Shared/Module.master" Language="C#" AutoEventWireup="true"
    CodeFile="CreateObjective.aspx.cs" Inherits="SG.ALD.Schema.Modules.Manage.CreateObjective"
    ClientIDMode="Static" %&gt;

&lt;%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxtoolkit" %&gt;
&lt;%@ Register Assembly="SG.Practices.Framework.CoreServices.Client.Web.WebUIControls"
    Namespace="SG.Practices.Framework.CoreServices.Client.Web.WebUIControls" TagPrefix="cc1" %&gt;
&lt;%@ Register Src="../../../SharedControl/AuditDataControl.ascx" TagName="AuditDataControl"
    TagPrefix="uc1" %&gt;
&lt;asp:Content ID="Content1" runat="server" ContentPlaceHolderID="SubModuleContent"&gt;
    &amp;nbsp;
     &lt;script type="text/javascript" src="C:\HOMEWARE\Aldschema\trunk\Src\Webserver\WEBUI\Scripts\jquery-1.4.1-vsdoc.js"&gt;

        PageInitialization();






            $('input[id$=txtObjectiveCode]').keydown(function () { 


            alert('jquery!!!!!!');
            });





        function PageInitialization() {

            PageJQInitialization();
        }

        function EndRequestHandler(sender, args) {
            if (args.get_error() == undefined) {
                PageJQInitialization();
            }
        }


        }
    &lt;/script&gt;
     &lt;table border="0" cellspacing="0" cellpadding="0" width="660px" align="center"&gt;
        &lt;tr&gt;
            &lt;td width="5px" class="tableleft"&gt;
            &lt;/td&gt;
            &lt;td class="tablemiddle"&gt;
                &lt;asp:Image runat="server" ID="roleImage" SkinID="gridHeaderImage" /&gt;&lt;asp:Label runat="server"
                    ID="moduleHeaderCaption" /&gt;
            &lt;/td&gt;
            &lt;td width="5px" class="tableright"&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td valign="top" class="tablelineleft" width="1px"&gt;
            &lt;/td&gt;
            &lt;td valign="top" border="0" cellspacing="0" cellpadding="0"&gt;
                &lt;table width="600px"&gt;
                    &lt;tr&gt;
                        &lt;td align="center" colspan="2"&gt;
                            &lt;asp:Label ID="lblmsg" runat="server" CssClass="lgt" ForeColor="#CC0000"&gt;&lt;/asp:Label&gt;
                        &lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr&gt;
                        &lt;td style="width: 30%" align="right"&gt;
                            &amp;nbsp;
                        &lt;/td&gt;
                        &lt;td style="width: 70%" align="left"&gt;
                            &amp;nbsp;
                        &lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr&gt;
                        &lt;td style="width: 30%; height: 22px;" align="right" class="lgt"&gt;
                            &lt;span runat="server"  style="color: #ff0033"&gt;*&lt;/span&gt;Objective Code:&amp;nbsp;&amp;nbsp;
                        &lt;/td&gt;
                        &lt;td style="width: 70%; height: 22px;" align="left" class="txtwt"&gt;
                            &lt;asp:TextBox ID="txtObjectiveCode" runat="server" TabIndex="1" MaxLength="50" 
                                         SkinID="textboxMandatory" &gt;&lt;/asp:TextBox&gt;
                            &lt;%-- &lt;tr&gt;
                        &lt;td style="width: 30%" align="right" class="lgt"&gt;
                            &lt;span style="color: #ff0033"&gt;*&lt;/span&gt; Select City:&amp;nbsp;&amp;nbsp;
                        &lt;/td&gt;
                        &lt;td style="width: 70%" align="left" class="txtwt"&gt;
                        &lt;div class="mandatoryField" style="width:150px"&gt;
                           &lt;asp:DropDownList ID="drpCity" TabIndex="6" runat="server" AutoPostBack="true" Width="150px" OnSelectedIndexChanged="drpCity_SelectedIndexChanged"&gt;
                            &lt;/asp:DropDownList&gt;
                         &lt;/div&gt;
                        &lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr&gt;
                        &lt;td style="width: 30%" align="right" class="lgt"&gt;
                            &lt;span style="color: #ff0033"&gt;*&lt;/span&gt; Select Location:&amp;nbsp;&amp;nbsp;
                        &lt;/td&gt;
                        &lt;td style="width: 70%" align="left" class="txtwt"&gt;
                           &lt;div class="mandatoryField" style="width:150px"&gt;
                           &lt;asp:DropDownList ID="drpSite"  Width="150px" TabIndex="7" runat="server"&gt;
                            &lt;/asp:DropDownList&gt;
                           &lt;/div&gt;
                        &lt;/td&gt;
                    &lt;/tr&gt;--%&gt;                            &lt;%-- &lt;tr&gt;
                        &lt;td style="width: 30%" align="right" class="lgt"&gt;
                            &lt;span style="color: #ff0033"&gt;*&lt;/span&gt; Select City:&amp;nbsp;&amp;nbsp;
                        &lt;/td&gt;
                        &lt;td style="width: 70%" align="left" class="txtwt"&gt;
                        &lt;div class="mandatoryField" style="width:150px"&gt;
                           &lt;asp:DropDownList ID="drpCity" TabIndex="6" runat="server" AutoPostBack="true" Width="150px" OnSelectedIndexChanged="drpCity_SelectedIndexChanged"&gt;
                            &lt;/asp:DropDownList&gt;
                         &lt;/div&gt;
                        &lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr&gt;
                        &lt;td style="width: 30%" align="right" class="lgt"&gt;
                            &lt;span style="color: #ff0033"&gt;*&lt;/span&gt; Select Location:&amp;nbsp;&amp;nbsp;
                        &lt;/td&gt;
                        &lt;td style="width: 70%" align="left" class="txtwt"&gt;
                           &lt;div class="mandatoryField" style="width:150px"&gt;
                           &lt;asp:DropDownList ID="drpSite"  Width="150px" TabIndex="7" runat="server"&gt;
                            &lt;/asp:DropDownList&gt;
                           &lt;/div&gt;
                        &lt;/td&gt;
                    &lt;/tr&gt;--%&gt;
                        &lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr&gt;
                        &lt;td style="width: 30%" align="right" class="lgt"&gt;
                            &lt;span style="color: #ff0033"&gt;*&lt;/span&gt;Description:&amp;nbsp;&amp;nbsp;
                        &lt;/td&gt;
                        &lt;td style="width: 70%" align="left" class="txtwt"&gt;
                            &lt;asp:TextBox ID="txtDescription" runat="server" Columns="30" TabIndex="2" MaxLength="25"
                                SkinID="textboxMandatory" Width="349px"&gt;&lt;/asp:TextBox&gt;
                            &amp;nbsp;&lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr&gt;
                        &lt;td style="width: 30%" align="right" class="lgt"&gt;
                            &amp;nbsp;
                        &lt;/td&gt;
                        &lt;td style="width: 70%" align="left" class="txtwt"&gt;
                            &amp;nbsp;&lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr&gt;
                        &lt;td style="width: 30%" align="right" class="lgt"&gt;
                            &amp;nbsp;&lt;/td&gt;
                        &lt;td style="width: 70%" align="left" class="txtwt"&gt;
                            &amp;nbsp;&lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;%-- &lt;tr&gt;
                        &lt;td style="width: 30%" align="right" class="lgt"&gt;
                            &lt;span style="color: #ff0033"&gt;*&lt;/span&gt; Select City:&amp;nbsp;&amp;nbsp;
                        &lt;/td&gt;
                        &lt;td style="width: 70%" align="left" class="txtwt"&gt;
                        &lt;div class="mandatoryField" style="width:150px"&gt;
                           &lt;asp:DropDownList ID="drpCity" TabIndex="6" runat="server" AutoPostBack="true" Width="150px" OnSelectedIndexChanged="drpCity_SelectedIndexChanged"&gt;
                            &lt;/asp:DropDownList&gt;
                         &lt;/div&gt;
                        &lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr&gt;
                        &lt;td style="width: 30%" align="right" class="lgt"&gt;
                            &lt;span style="color: #ff0033"&gt;*&lt;/span&gt; Select Location:&amp;nbsp;&amp;nbsp;
                        &lt;/td&gt;
                        &lt;td style="width: 70%" align="left" class="txtwt"&gt;
                           &lt;div class="mandatoryField" style="width:150px"&gt;
                           &lt;asp:DropDownList ID="drpSite"  Width="150px" TabIndex="7" runat="server"&gt;
                            &lt;/asp:DropDownList&gt;
                           &lt;/div&gt;
                        &lt;/td&gt;
                    &lt;/tr&gt;--%&gt;
                    &lt;tr&gt;
                        &lt;td style="width: 30%" align="right" class="lgt"&gt;
                            &amp;nbsp;
                        &lt;/td&gt;
                        &lt;td style="width: 70%" align="left" class="txtwt"&gt;
                            &amp;nbsp;&lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr&gt;
                        &lt;td style="width: 30%" align="right" class="lgt"&gt;
                            &amp;nbsp;&lt;/td&gt;
                        &lt;td style="width: 70%" align="left" class="txtwt"&gt;
                            &amp;nbsp;&lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr&gt;
                        &lt;td style="width: 30%" align="right"&gt;
                            &amp;nbsp;
                        &lt;/td&gt;
                        &lt;td style="width: 0%" align="left"&gt;
                            &lt;table style="width: 100%"&gt;
                                &lt;tr&gt;
                                    &lt;td width="10%"&gt;
                                        &lt;asp:Button ID="btnSave" runat="server" TabIndex="10" Text="Save" CssClass="button_70x20"
                                            OnClick="btnSave_Click" AccessKey="a" height="22px" width="71px" /&gt;
                                    &lt;/td&gt;
                                    &lt;td&gt;
                                        &lt;asp:Button ID="btnCancel" runat="server" TabIndex="11" Text="Cancel" CausesValidation="False"
                                            CssClass="button_70x20 cancel" OnClick="btnCancel_Click" AccessKey="c" 
                                                         Width="71px" /&gt;
                                        &lt;asp:Button ID="btnAudit" runat="server" Text="View Audit" TabIndex="12" CausesValidation="False"
                                            CssClass="button_90x20" OnClick="btnAudit_Click" AccessKey="w" 
                                                         Visible="False" Width="136px" /&gt;
                                    &lt;/td&gt;
                                &lt;/tr&gt;
                            &lt;/table&gt;
                        &lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/table&gt;
            &lt;/td&gt;
            &lt;td valign="top" class="tablelineright"&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
        &lt;tr&gt;
            &lt;td class="tablefooterleft"&gt;
            &lt;/td&gt;
            &lt;td class="tablefootermiddle"&gt;
            &lt;/td&gt;
            &lt;td class="tablefooterright"&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/table&gt;
    &lt;uc1:AuditDataControl ID="AuditDataControl1" runat="server" /&gt;
&lt;/asp:Content&gt;
</code></pre>
