jquery not working in user control page - javascript

In my project i am using Chosen jQuery plugin for searching dropdownlist
in my Master page end of before body tag put the css and jquery script files
<link href="/assets/css/chosen.css" rel="stylesheet" />
<script src="/assets/css/chosen.jquery.js"></script>
<script src="/assets/css/chosen.jquery2.js"></script>
dropdown list i called class like below sample
<asp:DropDownList ID="Dropworktype" runat="server" ***CssClass="chzn-select"*** AutoPostBack="True" >
<asp:ListItem Value="0">-ఏ పని చేస్తున్నారు-</asp:ListItem>
<asp:ListItem Value="వ్యవసాయ కార్మికులు">వ్యవసాయ కార్మికులు</asp:ListItem>
<asp:ListItem Value="మత్స్య కారులు">మత్స్య కారులు</asp:ListItem>
<asp:ListItem Value="నేత పనివారు ">నేత పనివారు</asp:ListItem>
<asp:ListItem Value="కల్లు గీత కార్మికులు">కల్లు గీత కార్మికులు</asp:ListItem>
<asp:ListItem Value="కుమ్మరి / ఇటుక బట్టి ">కుమ్మరి / ఇటుక బట్టి</asp:ListItem>
<asp:ListItem Value="గొర్రెల కాపరి ">గొర్రెల కాపరి </asp:ListItem>
<asp:ListItem Value="వడ్రంగి / కంసాలి ">వడ్రంగి / కంసాలి</asp:ListItem>
<asp:ListItem Value="చర్మకారులు">చర్మకారులు</asp:ListItem>
<asp:ListItem Value="పూజారి">పూజారి</asp:ListItem>
<asp:ListItem Value="వ్యాపారి ">వ్యాపారి </asp:ListItem>
<asp:ListItem Value="తాపీ మేస్త్రి ">తాపీ మేస్త్రి </asp:ListItem>
<asp:ListItem Value="10">ఇతరములు </asp:ListItem>
</asp:DropDownList>
choosen jquery search working fine in my page. But when i am using same in user control page its not working.
i dont know where is the problem in my page jquery problem or page problem
please help me thanks...
This is my User control page
<%# Control Language="C#" AutoEventWireup="true" CodeBehind="Basic-Inser-Details.ascx.cs" Inherits="Grievance.User_Controls.Basic_Inser_Details" %>
<script type="text/javascript">
// WRITE THE VALIDATION SCRIPT IN THE HEAD TAG.
function isNumber(evt) {
var iKeyCode = (evt.which) ? evt.which : evt.keyCode
if (iKeyCode != 46 && iKeyCode > 31 && (iKeyCode < 48 || iKeyCode > 57))
return false;
return true;
}
</script>
<link href="../assets/css/chosen.css" rel="stylesheet" />
<script src="../assets/css/chosen.jquery.js"></script>
<script src="../assets/css/chosen.jquery2.js"></script>
<%# Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<table class="table table-striped table-bordered">
<div class="alert alert-error" id="diverror" runat="server" visible="false">
<caption>
<button class="close" data-dismiss="alert">
×
</button>
<strong style="color:#fff; font-size:16px; font-weight:400; text-shadow:none;">అర్జీదారుడు గతంలో దాకలు చేసిన అర్జీ వివరాలు</strong> <a data-toggle="modal" href="#modal-table" style="color:#94210a; font-size:16px; font-weight:400; text-shadow:none; text-decoration:underline;">కొరకు ఇక్కడ క్లిక్ చేయండి </a>
</caption>
</div>
<div class="alert alert-error" id="Adhererror" runat="server" visible="false">
<button data-dismiss="alert" class="close">×</button>
<strong style="color:#fff; font-size:16px; font-weight:400; text-shadow:none;">అర్జిదారుని వివరాలు ఆధార్ నుండి "101" వచ్చిన యెడల <span style="color:#94210a; font-size:16px; font-weight:400; text-shadow:none; text-decoration:underline;"> ఉంది కాని తిసుకు రాలేదు </span> అనే ఆప్షన్ ఎంచుకోండి </strong>
</div>
<tr>
<td width="21%"><span class="red">*</span> ఆధార్ కార్డు
<asp:RequiredFieldValidator ID="RequiredFieldValidator16" CssClass="error" SetFocusOnError="true" ControlToValidate="aadhaselection"
runat="server" ValidationGroup="basicinfo"></asp:RequiredFieldValidator>
<asp:RequiredFieldValidator ID="RequiredFieldValidator15" CssClass="error" SetFocusOnError="true" ControlToValidate="aadhaselection"
runat="server" ValidationGroup="aadharinfo"></asp:RequiredFieldValidator>
</td>
<td width="2%">:</td>
<td colspan="3">
<asp:RadioButtonList ID="aadhaselection" runat="server" CssClass="border" ValidationGroup="basicinfo" AutoPostBack="true" OnSelectedIndexChanged="aadhaselection_SelectedIndexChanged" RepeatDirection="Horizontal">
<asp:ListItem Value="1">ఉంది</asp:ListItem>
<asp:ListItem Value="2"> ఉంది కానీ తీసుకురాలేదు</asp:ListItem>
<asp:ListItem Value="3">నమోదుచేసుకోలేదు</asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
<tr id="trtxtaadhar" runat="server" visible="false">
<td><span class="red">*</span> ఆధార్ నంబర్:
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" ControlToValidate="txtAdherno" CssClass="error" SetFocusOnError="true"
runat="server" ValidationGroup="basicinfo"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" controltovalidate="txtAdherno" CssClass="error" SetFocusOnError="true" validationexpression="^[0-9]{12}$" ValidationGroup="basicinfo"></asp:RegularExpressionValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" controltovalidate="txtAdherno" CssClass="error" SetFocusOnError="true" validationexpression="^[0-9]{12}$" ValidationGroup="aadharinfo"></asp:RegularExpressionValidator>
</td>
<td>:</td>
<td width="25%">
<asp:TextBox ID="txtAdherno" CssClass="form-control" MaxLength="12" ValidationGroup="basicinfo" runat="server"></asp:TextBox>
<cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server"
TargetControlID="txtAdherno"
FilterType="Numbers" />
</td>
<td colspan="2">
<asp:Button ID="btbaadher0" runat="server" class="btn btn-success" OnClick="btbaadher_Click" Text="ధృవీకరించండి" ValidationGroup="aadharinfo" />
</td>
</tr>
</table>
<table id="aadhartable" runat="server" class="table table-bordered" visible="false">
<tr>
<td align="center" colspan="9" style="background: #5c7399; color: #fff;">అర్జీదారు వివరాలు</td>
</tr>
<tr>
<td width="14%"><span class="red">*</span> అర్జీదారుని పేరు
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtname" CssClass="error" SetFocusOnError="true" ValidationGroup="basicinfo"></asp:RequiredFieldValidator>
</td>
<td width="2%">: </td>
<td width="26%">
<asp:TextBox ID="txtname" runat="server" CssClass="telugu form-control" Visible="false"></asp:TextBox>
<asp:Label ID="lblname" runat="server" Visible="false"></asp:Label>
</td>
<td width="12%"><span class="red">*</span> c/o పేరు
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtcareof" CssClass="error" SetFocusOnError="true" ValidationGroup="basicinfo"></asp:RequiredFieldValidator>
</td>
<td width="2%">:</td>
<td width="28%">
<asp:TextBox ID="txtcareof" runat="server" CssClass="telugu form-control" Visible="false"></asp:TextBox>
<asp:Label ID="Label2" runat="server" Visible="false"></asp:Label>
</td>
<td rowspan="6" align="center" valign="top" style="width:150px;">
<asp:Image ID="imgpic" runat="server" Style="height: 155px; width: 130px;" />
<asp:HiddenField ID="hdnpic" runat="server" />
</td>
</tr>
<tr>
<td><span class="red">*</span> వయస్సు
<asp:RegularExpressionValidator ID="revage" runat="server" controltovalidate="txtage" CssClass="error" SetFocusOnError="true" validationexpression="^[0-9]{2}$" ValidationGroup="basicinfo"></asp:RegularExpressionValidator>
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtage" CssClass="error" SetFocusOnError="true" ValidationGroup="basicinfo"></asp:RequiredFieldValidator>
</td>
<td>:</td>
<td>
<asp:TextBox ID="txtage" runat="server" MaxLength="2" CssClass="form-control" onkeypress="javascript:return isNumber (event)" Visible="false"></asp:TextBox>
<asp:Label ID="lblage" runat="server" Visible="false"></asp:Label>
</td>
<td><span class="red">*</span> లింగము
<asp:RequiredFieldValidator ID="RequiredFieldValidator21" runat="server" ControlToValidate="ddlgender" CssClass="error" InitialValue="0" SetFocusOnError="true" ValidationGroup="basicinfo"></asp:RequiredFieldValidator>
</td>
<td>:</td>
<td>
<asp:DropDownList ID="ddlgender" Visible="false" runat="server">
<asp:ListItem Value="0">లింగము</asp:ListItem>
<asp:ListItem Value="1">పురుషుడు</asp:ListItem>
<asp:ListItem Value="2">స్త్రీ</asp:ListItem>
<asp:ListItem Value="3">ఇతరులు</asp:ListItem>
</asp:DropDownList>
<asp:Label ID="lblgender" runat="server" Visible="false"></asp:Label>
</td>
</tr>
<tr>
<td><span class="red">*</span> జిల్లా
<asp:RequiredFieldValidator ID="RequiredFieldValidator19" runat="server" ControlToValidate="ddlditric" CssClass="error" InitialValue="-జిల్లా-" SetFocusOnError="true" ValidationGroup="basicinfo"></asp:RequiredFieldValidator>
</td> <td>:</td>
<td>
<asp:DropDownList ID="ddlditric" Visible="false" OnSelectedIndexChanged="ddlditric_SelectedIndexChanged" AutoPostBack="true" runat="server"></asp:DropDownList>
<asp:Label ID="lbldistric" runat="server" Visible="false"></asp:Label>
<asp:HiddenField ID="hidndistricid" runat="server" />
<asp:HiddenField ID="hdpincode" runat="server" />
</td>
<td><span class="red">*</span> మండలం
<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="dropmandal" CssClass="error" InitialValue="-మండలం-" SetFocusOnError="true" ValidationGroup="basicinfo"></asp:RequiredFieldValidator>
</td>
<td>:</td>
<td>
<asp:DropDownList ID="dropmandal" runat="server" AutoPostBack="True" CssClass="form-control" OnSelectedIndexChanged="dropmandal_SelectedIndexChanged" Visible="false"></asp:DropDownList>
<asp:Label ID="lblmandal" runat="server" Visible="false"></asp:Label>
<asp:LinkButton ID="lnkmandal" runat="server" OnClick="lnkmandal_Click"><img width="22" src="/images/edit-btn2.png" /></asp:LinkButton>
</td>
</tr>
<tr>
<td><span class="red">*</span> పంచాయతి / టౌన్ :
<asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="droptwon" CssClass="error" InitialValue="-రెవెన్యూ గ్రామం-" SetFocusOnError="true" ValidationGroup="basicinfo"></asp:RequiredFieldValidator>
</td>
<td>:</td>
<td>
<asp:DropDownList ID="droptwon" runat="server" CssClass="form-control" Visible="false"></asp:DropDownList>
<asp:Label ID="lbltown" runat="server" Visible="false"></asp:Label>
<asp:LinkButton ID="lblpancht" runat="server" OnClick="lblpancht_Click"><img width="22" src="/images/edit-btn2.png" /></asp:LinkButton>
</td>
<td><span class="red">*</span> హాబిటేషను
<asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="txthabitation" CssClass="error" SetFocusOnError="true" ValidationGroup="basicinfo"></asp:RequiredFieldValidator>
</td>
<td>:</td>
<td>
<asp:TextBox ID="txthabitation" runat="server" CssClass="telugu" Visible="false"></asp:TextBox>
<asp:Label ID="lblhabitation" runat="server" Visible="false"></asp:Label>
</td>
</tr>
<tr>
<td><span class="red">*</span> బిల్డింగ్ నం
<asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="txtbuildno" CssClass="error" SetFocusOnError="true" ValidationGroup="basicinfo"></asp:RequiredFieldValidator>
</td>
<td>:</td>
<td>
<asp:TextBox ID="txtbuildno" runat="server" CssClass="form-control" Visible="false"></asp:TextBox>
<cc1:FilteredTextBoxExtender ID="ftbe" runat="server"
TargetControlID="txtbuildno"
FilterType="LowercaseLetters, UppercaseLetters,Custom, Numbers" ValidChars="-/"/>
<asp:Label ID="lblbuilding" runat="server" Visible="false"></asp:Label>
</td>
<td><span class="red">*</span> వృత్తి
<asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ControlToValidate="Dropworktype" CssClass="error" InitialValue="0" SetFocusOnError="true" ValidationGroup="basicinfo"></asp:RequiredFieldValidator>
</td>
<td>:</td>
<td>
<asp:DropDownList ID="Dropworktype" runat="server" CssClass="chzn-select" AutoPostBack="True" >
<asp:ListItem Value="0">-ఏ పని చేస్తున్నారు-</asp:ListItem>
<asp:ListItem Value="వ్యవసాయ కార్మికులు">వ్యవసాయ కార్మికులు</asp:ListItem>
<asp:ListItem Value="మత్స్య కారులు">మత్స్య కారులు</asp:ListItem>
<asp:ListItem Value="నేత పనివారు ">నేత పనివారు</asp:ListItem>
<asp:ListItem Value="కల్లు గీత కార్మికులు">కల్లు గీత కార్మికులు</asp:ListItem>
<asp:ListItem Value="కుమ్మరి / ఇటుక బట్టి ">కుమ్మరి / ఇటుక బట్టి</asp:ListItem>
<asp:ListItem Value="గొర్రెల కాపరి ">గొర్రెల కాపరి </asp:ListItem>
<asp:ListItem Value="వడ్రంగి / కంసాలి ">వడ్రంగి / కంసాలి</asp:ListItem>
<asp:ListItem Value="చర్మకారులు">చర్మకారులు</asp:ListItem>
<asp:ListItem Value="పూజారి">పూజారి</asp:ListItem>
<asp:ListItem Value="వ్యాపారి ">వ్యాపారి </asp:ListItem>
<asp:ListItem Value="తాపీ మేస్త్రి ">తాపీ మేస్త్రి </asp:ListItem>
<asp:ListItem Value="10">ఇతరములు </asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="txtoccupation" runat="server" CssClass="telugu form-control" Visible="false"></asp:TextBox>
</td>
</tr>
<tr>
<td><span class="red">*</span> ఫోను. నం
<asp:RequiredFieldValidator ID="RequiredFieldValidator12" runat="server" ControlToValidate="txtmoble" CssClass="error" SetFocusOnError="true" ValidationGroup="basicinfo"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="txtmobilevalidation" runat="server" controltovalidate="txtmoble" CssClass="error" SetFocusOnError="true" validationexpression="^[0-9]{10}$" ValidationGroup="basicinfo"></asp:RegularExpressionValidator>
</td>
<td>:</td>
<td>
<asp:TextBox ID="txtmoble" runat="server" CssClass="form-control" visible="false" MaxLength="10" onkeypress="javascript:return isNumber (event)" AutoPostBack="True" OnTextChanged="txtmoble_TextChanged"></asp:TextBox>
<br /> <asp:RegularExpressionValidator ID="RegularExpressionValidator12" runat="server" ControlToValidate="txtmoble" ErrorMessage="సరైన నంబరు ఇవ్వగలరు" CssClass="error" SetFocusOnError="true" ValidationGroup="basicinfo" ValidationExpression="^[7-9][0-9]{9}$"></asp:RegularExpressionValidator>
<asp:Label ID="lblmobile" runat="server" Visible="false"></asp:Label>
<asp:LinkButton ID="hyperedit" runat="server" Visible="false" OnClick="hyperedit_Click"><img width="22" src="/images/edit-btn2.png" /></asp:LinkButton>
</td>
<td>ఓటరు కార్డ్ నం.<%--(EPIC)--%></td>
<td>:</td>
<td><asp:TextBox ID="txtvoter" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>E-mail ID</td>
<td>:</td>
<td>
<asp:TextBox ID="txtmailid" runat="server"></asp:TextBox>
<asp:RegularExpressionValidator
ID="regtxtmailid"
runat="server" CssClass="error"
ValidationExpression="\w+([-+.']\w+)*#\w+([-.]\w+)*\.\w+([-.]\w+)*"
ControlToValidate="txtmailid"
ErrorMessage="దయచేసి మీ E-mailid సరిచుసుకోండి!"
>
</asp:RegularExpressionValidator>
</td>
<td><span class="red">*</span> కులం
<asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" ControlToValidate="RadioButtonList3" CssClass="error" SetFocusOnError="true" ValidationGroup="basicinfo"></asp:RequiredFieldValidator>
</td>
<td>:</td>
<td colspan="2">
<asp:RadioButtonList ID="RadioButtonList3" runat="server" CssClass="border" RepeatDirection="Horizontal">
<asp:ListItem>ఎస్.సి.</asp:ListItem>
<asp:ListItem>ఎస్.టి.</asp:ListItem>
<asp:ListItem>బి.సి.</asp:ListItem>
<asp:ListItem>మైనారిటీ.</asp:ListItem>
<asp:ListItem>ఇతరులు.</asp:ListItem>
</asp:RadioButtonList> </td>
</tr>
<tr>
<td><span class="red">*</span> అర్జీ కేటగిరి <asp:RequiredFieldValidator ID="RequiredFieldValidator2" InitialValue="0" ControlToValidate="ddlcate" CssClass="error" SetFocusOnError="true"
runat="server" ValidationGroup="basicinfo"></asp:RequiredFieldValidator> </td>
<td>:</td>
<td>
<asp:DropDownList ID="ddlcate" runat="server" OnSelectedIndexChanged="ddlcate_SelectedIndexChanged" AutoPostBack="True">
<asp:ListItem Value="0">అర్జీ కేటగిరి</asp:ListItem>
<asp:ListItem Value="1">వ్యక్తి గతం–ఆర్ధికం </asp:ListItem>
<asp:ListItem Value="2">వ్యక్తి గతం–ఆర్ధికేతరం</asp:ListItem>
<asp:ListItem Value="3">సామాజికం- ఆర్ధికం</asp:ListItem>
<asp:ListItem Value="4">సామాజికం- ఆర్ధికేతరం</asp:ListItem>
</asp:DropDownList>
</td>
<td>కాలపరిమితి
</td>
<td>:</td>
<td colspan="2"><asp:Label runat="server" ID="lbltimescale" Text="0" ></asp:Label> <asp:Label ID="lbltext" runat="server" Text="రోజులు"></asp:Label>
</td>
</tr>
<tr >
<td> వార్షిక ఆదాయం
</td>
<td>:</td>
<td colspan="6"> <asp:RadioButtonList ID="rbnewfinance" runat="server" CssClass="border" RepeatDirection="Horizontal">
<asp:ListItem>60,000 లోపు</asp:ListItem>
<asp:ListItem>60,000 -75,000</asp:ListItem>
<asp:ListItem>75,000 పైబడి</asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
<tr runat="server" id="traadhernote" visible="false">
<td> <span class="red">*</span> ఆధార్ చిరునామాలో మార్పు ఉందా?
<asp:RequiredFieldValidator ID="RequiredFieldValidator13" runat="server" ControlToValidate="rbincome" CssClass="error" SetFocusOnError="true" ValidationGroup="basicinfo"></asp:RequiredFieldValidator>
</td>
<td>:</td>
<td colspan="6">
<asp:RadioButtonList ID="rbincome" runat="server" CssClass="border" RepeatDirection="Horizontal" AutoPostBack="True" OnSelectedIndexChanged="rbincome_SelectedIndexChanged">
<asp:ListItem Value="1">ఉంది </asp:ListItem>
<asp:ListItem Value="2" >లేదు</asp:ListItem>
</asp:RadioButtonList> </td>
</tr>
</table>
<table runat="server" id="trprathuthanivasam" visible="false" class="table table-bordered">
<tr>
<td width="21%"> <span class="red">*</span> జిల్లా
<asp:RequiredFieldValidator ID="RequiredFieldValidator23" runat="server" ControlToValidate="ddlprentdistric" CssClass="error" InitialValue="-జిల్లా-" SetFocusOnError="true" ValidationGroup="basicinfo"></asp:RequiredFieldValidator>
</td>
<td width="2%">:</td>
<td width="22%">
<asp:DropDownList ID="ddlprentdistric" OnSelectedIndexChanged="ddlprentdistric_SelectedIndexChanged" AutoPostBack="True" runat="server"></asp:DropDownList></td>
<td width="13%"> <span class="red">*</span> మండలం
<asp:RequiredFieldValidator ID="RequiredFieldValidator14" runat="server" ControlToValidate="dropPramandal" CssClass="error" InitialValue="-మండలం-" SetFocusOnError="true" ValidationGroup="basicinfo"></asp:RequiredFieldValidator>
</td>
<td width="2%">:</td>
<td>
<asp:DropDownList ID="dropPramandal" runat="server" AutoPostBack="True" CssClass="form-control" OnSelectedIndexChanged="dropPramandal_SelectedIndexChanged">
</asp:DropDownList>
</td>
</tr>
<tr>
<td> <span class="red">*</span> పంచాయతి / టౌన్ :
<asp:RequiredFieldValidator ID="RequiredFieldValidator17" runat="server" ControlToValidate="DroppraTown" CssClass="error" InitialValue="-రెవెన్యూ గ్రామం-" SetFocusOnError="true" ValidationGroup="basicinfo"></asp:RequiredFieldValidator>
</td>
<td>:</td>
<td>
<asp:DropDownList ID="DroppraTown" runat="server" CssClass="form-control">
</asp:DropDownList>
</td>
<td> <span class="red">*</span> హాబిటేషను
<asp:RequiredFieldValidator ID="RequiredFieldValidator20" runat="server" ControlToValidate="txtprahabitation" CssClass="error" SetFocusOnError="true" ValidationGroup="basicinfo"></asp:RequiredFieldValidator>
</td>
<td>:</td>
<td>
<asp:TextBox ID="txtprahabitation" runat="server" CssClass="telugu form-control"></asp:TextBox>
</td>
</tr>
<tr>
<td><span class="red">*</span> బిల్డింగ్ నం
<asp:RequiredFieldValidator ID="RequiredFieldValidator22" runat="server" ControlToValidate="txtbuilding" CssClass="error" SetFocusOnError="true" ValidationGroup="basicinfo"></asp:RequiredFieldValidator>
</td>
<td>:</td>
<td colspan="4">
<asp:TextBox ID="txtbuilding" runat="server" CssClass="form-control"></asp:TextBox><cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server"
TargetControlID="txtbuilding"
FilterType=" LowercaseLetters, UppercaseLetters,Custom, Numbers" ValidChars="-/"/>
</td>
</tr>
</table>
<div id="modal-table" class="modal hide fade">
<div class="modal-header no-padding">
<div class="table-header">
<button type="button" class="close" data-dismiss="modal">×</button>
దాకలు చేసిన అర్జీ వివరాలు
</div>
</div>
<div class="modal-body no-padding">
</div>
<div class="modal-footer">
<button class="btn btn-small btn-danger pull-left" data-dismiss="modal">
<i class="icon-remove"></i>
Close</button>
</div>
</div>

On each different page that you open in a browser you have to include the plugin and (before calling the plugin) jquery library too. So if your master page and user control page are two differnt pages just replicate the same headers in both.
<link href="/assets/css/chosen.css" rel="stylesheet" />
<script src="/assets/css/chosen.jquery.js"></script>
<script src="/assets/css/chosen.jquery2.js"></script>
Also note that, based on the directory structure of your page, if the user control page is not in the same folder of the master page you will need to adapt the path to the included files.

Related

Confusion Getting this Errorr Unable to get property 'checked' of undefined or null reference

In Function when i use .checked then it stop working & generate below Error.
Currently im using Visual Studio 2015.Please Help
function GenderValidation(sender , e)
{
var male = document.getElementById('RadioButton_male').Checked;
var female = document.getElementById('RadioButton_female').Checked;
if (male == true || female == true)
{
e.IsValid = true;
} else {
e.IsValid = false;
}
}
**
0x800a138f - JavaScript runtime error: Unable to get property
'checked' of undefined or null reference
**
This is my Complete code
<%# Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="contactus.aspx.cs" Inherits="DVManagmentProject.contactus" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<style type="text/css">
.auto-style1 {
width: 70%;
}
.auto-style2 {
width: 190px;
}
.auto-style3 {
width: 190px;
height: 34px;
}
.auto-style4 {
height: 34px;
}
.auto-style5 {
width: 190px;
height: 150px;
}
.auto-style6 {
height: 150px;
}
</style>
<script type="text/javascript" >
function GenderValidation(sender , e)
{
var male = document.getElementById('ContentPlaceHolder1_RadioButton_male').Checked;
var female = document.getElementById('ContentPlaceHolder1_RadioButton_female').Checked;
if (male == true || female == true)
{
e.IsValid = true;
} else {
e.IsValid = false;
}
}
function CustomValidatorAgremennt(sender, e)
{
var agreemenT = document.getElementById('ContentPlaceHolder1_CheckBox_agreement').Checked;
if(agreemenT==true)
{
e.IsValid = true;
}else
{
e.IsValid = false;
}
}
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<h2>
This is Contact Us Page</h2>
<asp:ValidationSummary ID="contact_ValidationSummary" runat="server" BackColor="#FFFF99" ForeColor="Black" Font-Bold="true" Width="694px" BorderStyle="Double" />
<h3> Please Fill the Form Below:</h3>
<br />
<table class="auto-style1">
<tr>
<td class="auto-style2">Name:</td>
<td>
<asp:TextBox ID="name_TextBox" runat="server" Width="320px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator_name"
runat="server" Text="*"
ErrorMessage="Please Enter Your Name"
ForeColor="Red"
ControlToValidate="name_TextBox"
Display="Dynamic"
> </asp:RequiredFieldValidator>
<%-- <asp:RangeValidator ID="RangeValidator_name" runat="server"
ErrorMessage="*Text should between 10 to 30" MinimumValue="10" MaximumValue="30"
Type="Integer" ControlToValidate="name_TextBox"
Display="Dynamic"></asp:RangeValidator>--%>
</td>
</tr>
<tr>
<td class="auto-style3">Email:</td>
<td class="auto-style4">
<asp:TextBox ID="email_TextBox" runat="server" Width="320px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator_email"
runat="server"
SetFocusOnError="true"
Text="*"
ErrorMessage="Please Enter Your Email Name"
ControlToValidate="email_TextBox"
ForeColor="Red"
Display="Dynamic"> </asp:RequiredFieldValidator>
<asp:RegularExpressionValidator
ID="RegularExpressionValidator_email_TextBox"
runat="server"
ErrorMessage="Please Enter Correct Email Format"
Display="Dynamic"
ControlToValidate="email_TextBox"
ForeColor="Red"
SetFocusOnError="true"
Text="*"
ValidationExpression="\w+([-+.']\w+)*#\w+([-.]\w+)*\.\w+([-.]\w+)*" > </asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td class="auto-style3">Re-Enter Email:</td>
<td class="auto-style4">
<asp:TextBox ID="TextBox_ReEmail" runat="server" Width="320px"></asp:TextBox>
<asp:CompareValidator
ID="CompareValidator_ReEmail_TextBox"
runat="server"
ErrorMessage="Email Must be Match"
Operator="Equal"
ControlToValidate="TextBox_ReEmail"
ControlToCompare="email_TextBox"
Type="String"
Display="Dynamic"
ForeColor="Red"
Font-Bold="true">*</asp:CompareValidator>
<asp:RequiredFieldValidator ID="RequiredFieldValidator_ReEmail"
runat="server"
SetFocusOnError="true"
Text="*"
ErrorMessage="Please Confirm Your Email Name"
ControlToValidate="TextBox_ReEmail"
ForeColor="Red"
Display="Dynamic"> </asp:RequiredFieldValidator>
<asp:RegularExpressionValidator
ID="RegularExpressionValidator_ReEmail"
runat="server"
ErrorMessage="Please Enter Correct Re-Email Format"
Display="Dynamic"
ControlToValidate="TextBox_ReEmail"
ForeColor="Red"
SetFocusOnError="true"
Text="*"
ValidationExpression="\w+([-+.']\w+)*#\w+([-.]\w+)*\.\w+([-.]\w+)*" ></asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td class="auto-style3">Gender:</td>
<td class="auto-style4">
<asp:RadioButton ID="RadioButton_male" runat="server" Text="Male" GroupName="GenderGroup" />
<asp:RadioButton ID="RadioButton_female" runat="server" Text="Female" GroupName="GenderGroup" />
<asp:CustomValidator
ID="CustomValidator_genders"
runat="server"
ErrorMessage="Please Select Gender.!"
Font-Bold="True"
Display="Dynamic" ForeColor="Red" OnServerValidate="CustomValidator_genders_ServerValidate">*</asp:CustomValidator>
</td>
</tr>
<tr>
<td class="auto-style3">Age:</td>
<td class="auto-style4">
<asp:TextBox ID="Age_TextBox" runat="server" Width="318px"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server"
SetFocusOnError="true"
Text="*"
ErrorMessage="Please Enter Your Age"
ControlToValidate="Age_TextBox"
ForeColor="Red"
Display="Dynamic"> </asp:RequiredFieldValidator>
<asp:RangeValidator
ID="RangeValidator_Age"
runat="server"
ErrorMessage="Age should between 18 to 99"
Type="Integer"
Display="Dynamic"
SetFocusOnError="true"
ControlToValidate="Age_TextBox"
MinimumValue="18"
MaximumValue="99"
></asp:RangeValidator>
</td>
</tr>
<tr>
<td class="auto-style2">Subject:</td>
<td>
<asp:DropDownList ID="subject_DropDownList" runat="server" Width="320px">
</asp:DropDownList>
</td>
</tr>
<tr>
<td class="auto-style5">Message </td>
<td class="auto-style6">
<asp:TextBox ID="message_TextBox" runat="server" Height="140px" TextMode="MultiLine" Width="320px"></asp:TextBox>
</td>
</tr>
<tr>
<td class="auto-style2">Agreement:</td>
<td>
<asp:CheckBox ID="CheckBox_agreement" runat="server" Text="Please Select Our Terms And Conditions.!" />
<asp:CustomValidator
ID="CustomValidator_Agreement"
runat="server"
Display="Dynamic"
ErrorMessage="Please Check Terms and Conditions"
Font-Bold="True"
ForeColor="Red" OnServerValidate="CustomValidator_Agreement_ServerValidate">*</asp:CustomValidator>
</td>
</tr>
<tr>
<td class="auto-style2"> </td>
<td>
<asp:Button ID="submit_Button" runat="server" Font-Bold="True" Text="Submit" Width="320px" />
</td>
</tr>
<tr>
<td colspan="2">
</td>
</tr>
</table>
<p>
</p>
</asp:Content>
This is Debbuger Code
[1]: https://i.stack.imgur.com/PG8hC.jpg
[2]: https://i.stack.imgur.com/Jqw0X.jpg
[3]: https://i.stack.imgur.com/DuaNT.jpg
[4]: https://i.stack.imgur.com/DrTPP.jpg
[5]: https://i.stack.imgur.com/1Dhc1.jpg
[6]: https://i.stack.imgur.com/880dI.jpg
[7]: https://i.stack.imgur.com/DWQ7D.jpg
[8]: https://i.stack.imgur.com/LdHXg.jpg
[9]: https://i.stack.imgur.com/xVXI1.jpg
[10]: https://i.stack.imgur.com/qC4LA.jpg
Problem is Solved . I have Changed
ContentPlaceHolder1_RadioButton_male and
ContentPlaceHolder1_RadioButton_female
instead of
RadioButton_male and RadioButton_female
as well as in Javascript Function .i have changed (.Checked) in small (.checked) and it worked for me .

How to make bootstrap datetimepicker in table(in modal) show when the content behind has a scrollbar

I am unable to get my bootstrap datetimepicker to show properly in this table. I can tell the scrollbar in the table behind is the culprit any work around?Datetime Picker Position Image
This is the JS function where I put the widget positioning:
$(function () {
$('#datetimepickerCreationDate').datetimepicker({
format: 'DD-MMM-YYYY',
widgetPositioning: {
horizontal: 'left',
vertical: 'bottom'
}
});
});
And I've placed the td cell position to relative:
<style>
.table > tbody > tr > td, .table > tfoot > tr > td, .table > tfoot > tr > th{
position: relative !important;
border-top: none !important;
}<style>
This is the modal markup with the datetimepicker:
<div id="FilterModal" class="modal fade" role="dialog">
<div class="modal-dialog modal-md">
<div class="modal-content">
<asp:UpdatePanel ID="updateFilterModal" runat="server">
<ContentTemplate>
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="close">
<span aria-hidden="true">×</span>
</button>
<h4 class="modal-title">Filter Settings</h4>
</div>
<%-- modal-header--%>
<div class="modal-body">
<table id="tblFilterSettings" runat="server" class="table table-striped">
<thead>
<tr>
<th>Property
</th>
<th>Operator
</th>
<th>Value
</th>
</tr>
</thead>
<tbody>
<tr>
<td>Contractor Name
</td>
<td>
<asp:DropDownList ID="cboContractorNameOperator" runat="server" CssClass="form-control" ToolTip="Contractor Name Operator">
<asp:ListItem Value="=">Equals</asp:ListItem>
<asp:ListItem Value="like">Contains</asp:ListItem>
</asp:DropDownList>
</td>
<td>
<input id="txtContractorNameValue" class="form-control" runat="server" title="Contractor Name Value">
</td>
</tr>
<tr>
<td>Contract Number
</td>
<td>
<asp:DropDownList ID="cboContractNumberOperator" runat="server" CssClass="form-control" OnSelectedIndexChanged="cboContractNumberOperator_SelectedIndexChanged"
AutoPostBack="true" ToolTip="Contract Number Operator">
<asp:ListItem Value="=">Equals</asp:ListItem>
<asp:ListItem Value="<">Less Than</asp:ListItem>
<asp:ListItem Value="<=">Less Than or Equal</asp:ListItem>
<asp:ListItem Value=">">Greater Than</asp:ListItem>
<asp:ListItem Value=">=">Greater Than or Equal</asp:ListItem>
<asp:ListItem Value="Between">Between</asp:ListItem>
</asp:DropDownList>
</br>
<label id="lblContractNumberAnd" runat="server" visible="false">AND</label>
</td>
<td>
<input id="txtContractNumberValue" class="form-control" runat="server" title="Contract Number Value">
<asp:CustomValidator ID="cvtxtContractNumberValue" runat="server" ForeColor="red"
ControlToValidate="txtContractNumberValue" Display="None" ClientValidationFunction="CheckNumericalAmount"
ErrorMessage="Only numerical characters greater than 0 allowed." ValidationGroup="PageValidate"></asp:CustomValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender_cvtxtContractNumberValue" runat="server"
TargetControlID="cvtxtContractNumberValue">
</ajax:ValidatorCalloutExtender>
<br />
<input id="txtContractNumberValueAnd" class="form-control" runat="server" visible="false" title="Contract Number Value">
<asp:CustomValidator ID="cvtxtContractNumberValueAnd" runat="server" ForeColor="red"
ControlToValidate="txtContractNumberValueAnd" Display="None" ClientValidationFunction="CheckNumericalAmount"
ErrorMessage="Only numerical characters greater than 0 allowed." ValidationGroup="PageValidate"></asp:CustomValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender_cvtxtContractNumberValueAnd" runat="server"
TargetControlID="cvtxtContractNumberValueAnd">
</ajax:ValidatorCalloutExtender>
</td>
</tr>
<tr>
<td>Creation Date
</td>
<td>
<asp:DropDownList ID="cboCreationDateOperator" runat="server" CssClass="form-control" OnSelectedIndexChanged="cboCreationDateOperator_SelectedIndexChanged"
AutoPostBack="true" ToolTip="Creation Date Operator">
<asp:ListItem Value="=">Equals</asp:ListItem>
<asp:ListItem Value="<">Less Than</asp:ListItem>
<asp:ListItem Value="<=">Less Than or equal</asp:ListItem>
<asp:ListItem Value=">">Greater Than</asp:ListItem>
<asp:ListItem Value=">=">Greater Than or equal</asp:ListItem>
<asp:ListItem Value="Between">Between</asp:ListItem>
</asp:DropDownList>
</br>
<label id="lblCreationDateAnd" runat="server" visible="false">AND</label>
</td>
<td >
<div class='input-group date pull-right' id='datetimepickerCreationDate'>
<input class="form-control" runat="server" id="txtCreationDate" tabindex="7" title="Contract Creation Date" data-date-format="DD-MMM-YYYY"
onkeydown="return false" type="text">
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
<br />
<div class='input-group date' id='datetimepickerCreationDateAnd' visible="false" runat="server">
<input class="form-control" runat="server" id="txtCreationDateAnd" tabindex="8" title="Contract Creation Date" data-date-format="DD-MMM-YYYY"
onkeydown="return false">
<span class="input-group-addon">
<span class="glyphicon glyphicon-calendar"></span>
</span>
</div>
</td>
</tr>
<tr>
<td>Contract Type</td>
<td>
<asp:DropDownList ID="cboContractTypeOperator" runat="server" ToolTip="Contract Type Operator" CssClass="form-control">
<asp:ListItem Value="=">Equals</asp:ListItem>
<asp:ListItem Value="like '%' +">Contains</asp:ListItem>
</asp:DropDownList>
</td>
<td>
<input id="txtContractTypeValue" runat="server" title="Contract Type Value" class="form-control" />
</td>
</tr>
<tr>
<td>Contract Status</td>
<td>Equals
</td>
<td>
<asp:DropDownList ID="cboContractStatus" runat="server" CssClass="form-control" Style="display: inline;">
<asp:ListItem Value="All">All</asp:ListItem>
<asp:ListItem Value="3">Open</asp:ListItem>
<asp:ListItem Value="4">Closed</asp:ListItem>
<asp:ListItem Value="5">Rejected</asp:ListItem>
<asp:ListItem Value="1">Pending Approval</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</tbody>
</table>
</div>
</ContentTemplate>
</asp:UpdatePanel>
<div class="modal-footer">
<button type="button" runat="server" class="btn btn-primary" id="btnSaveFilterSettings" causesvalidation="true" validationgroup="PageValidate">Save</button>
</div>
<%--modal footer--%>
</div>
<%--modal-content--%>
</div>
<%--modal-lg--%>
</div>
<%-- Filter Modal--%>

what is parse error in update panel

Server Error in '/' Application.
Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.
Parser Error Message: Type 'System.Web.UI.UpdatePanel' does not have a public property named 'script'.
<!--modal start-->
<div class="modal fade" id="Addmodal" role="dialog">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
X
<h4 class="modal-title" style="color:red">Add</h4>
</div>
<div class="auto-style10" style="margin-top:11px; margin-bottom:7px;">
<p><u>Don't Leave Empty Field Please Fill 'N.A' There !! <b> : </b></u><br /><br />
</p>
<table style="float:right;">
<tr>
<td class="table">
<asp:Label ID="Label20" runat="server" Text="Date"></asp:Label>
</td>
<td class="table">
<asp:TextBox ID="TextBox1" runat="server" ReadOnly="true"></asp:TextBox>
<cc1:CalendarExtender ID="CalendarExtender0" PopupButtonID="TextBox1" runat="server" TargetControlID="TextBox1" Format="dd/MM/yyyy">
</cc1:CalendarExtender>
<%-- <asp:TextBox ID="dtpTransDate" runat="server" Width="90px"></asp:TextBox>
<asp1:CalendarExtender ID="dtpTransDate_CalendarExtender" runat="server" Enabled="True" Format="dd/MM/yyyy" TargetControlID="dtpTransDate">
</asp1:CalendarExtender>--%>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label21" runat="server" Text="Start Time"></asp:Label>
</td>
<td>
<asp:DropDownList ID="dllstarttime" runat="server" Style="font-family: Verdana; font-size: xx-small"
Width="150px" CssClass="dropdown">
<asp:ListItem Text="0:00" Selected="True"></asp:ListItem>
<asp:ListItem Text="7:00"></asp:ListItem>
<asp:ListItem Text="7:30"></asp:ListItem>
<asp:ListItem Text="8:00"></asp:ListItem>
<asp:ListItem Text="8:30"></asp:ListItem>
<asp:ListItem Text="9:00"></asp:ListItem>
<asp:ListItem Text="9:30"></asp:ListItem>
<asp:ListItem Text="10:00"></asp:ListItem>
<asp:ListItem Text="10:30"></asp:ListItem>
<asp:ListItem Text="11:00"></asp:ListItem>
<asp:ListItem Text="11:30"></asp:ListItem>
<asp:ListItem Text="12:00"></asp:ListItem>
<asp:ListItem Text="12:30"></asp:ListItem>
<asp:ListItem Text="13:00"></asp:ListItem>
<asp:ListItem Text="13:30"></asp:ListItem>
<asp:ListItem Text="14:00"></asp:ListItem>
<asp:ListItem Text="14:30"></asp:ListItem>
<asp:ListItem Text="15:00"></asp:ListItem>
<asp:ListItem Text="15:30"></asp:ListItem>
<asp:ListItem Text="16:00"></asp:ListItem>
<asp:ListItem Text="16:30"></asp:ListItem>
<asp:ListItem Text="17:00"></asp:ListItem>
<asp:ListItem Text="17:30"></asp:ListItem>
<asp:ListItem Text="18:00"></asp:ListItem>
<asp:ListItem Text="18:30"></asp:ListItem>
<asp:ListItem Text="19:00"></asp:ListItem>
<asp:ListItem Text="19:30"></asp:ListItem>
<asp:ListItem Text="20:00"></asp:ListItem>
<asp:ListItem Text="20:30"></asp:ListItem>
<asp:ListItem Text="21:00"></asp:ListItem>
<asp:ListItem Text="21:30"></asp:ListItem>
<asp:ListItem Text="22:00"></asp:ListItem>
<asp:ListItem Text="22:30"></asp:ListItem>
<asp:ListItem Text="23:00"></asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="txtday" runat="server" AutoPostBack="True" Visible="False"></asp:TextBox>
<%-- <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="dllstarttime"
ErrorMessage="*" InitialValue="0:00" ValidationGroup="s+u" ForeColor="#FF0066"></asp:RequiredFieldValidator>--%>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label22" runat="server" Text="End Time"></asp:Label>
</td>
<td>
<asp:DropDownList ID="ddlendtime" runat="server" Style="font-family: Verdana; font-size: xx-small"
Width="150px" CssClass="dropdown">
<asp:ListItem Text="0:00" Selected="True"></asp:ListItem>
<asp:ListItem Text="7:00"></asp:ListItem>
<asp:ListItem Text="7:30"></asp:ListItem>
<asp:ListItem Text="8:00"></asp:ListItem>
<asp:ListItem Text="8:30"></asp:ListItem>
<asp:ListItem Text="9:00"></asp:ListItem>
<asp:ListItem Text="9:30"></asp:ListItem>
<asp:ListItem Text="10:00"></asp:ListItem>
<asp:ListItem Text="10:30"></asp:ListItem>
<asp:ListItem Text="11:00"></asp:ListItem>
<asp:ListItem Text="11:30"></asp:ListItem>
<asp:ListItem Text="12:00"></asp:ListItem>
<asp:ListItem Text="12:30"></asp:ListItem>
<asp:ListItem Text="13:00"></asp:ListItem>
<asp:ListItem Text="13:30"></asp:ListItem>
<asp:ListItem Text="14:00"></asp:ListItem>
<asp:ListItem Text="14:30"></asp:ListItem>
<asp:ListItem Text="15:00"></asp:ListItem>
<asp:ListItem Text="15:30"></asp:ListItem>
<asp:ListItem Text="16:00"></asp:ListItem>
<asp:ListItem Text="16:30"></asp:ListItem>
<asp:ListItem Text="17:00"></asp:ListItem>
<asp:ListItem Text="17:30"></asp:ListItem>
<asp:ListItem Text="18:00"></asp:ListItem>
<asp:ListItem Text="18:30"></asp:ListItem>
<asp:ListItem Text="19:00"></asp:ListItem>
<asp:ListItem Text="19:30"></asp:ListItem>
<asp:ListItem Text="20:00"></asp:ListItem>
<asp:ListItem Text="20:30"></asp:ListItem>
<asp:ListItem Text="21:00"></asp:ListItem>
<asp:ListItem Text="21:30"></asp:ListItem>
<asp:ListItem Text="22:00"></asp:ListItem>
<asp:ListItem Text="22:30"></asp:ListItem>
<asp:ListItem Text="23:00"></asp:ListItem>
</asp:DropDownList>
<%--<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="ddlendtime"
ErrorMessage="*" InitialValue="0:00" ValidationGroup="s+u" ForeColor="#FF0066"></asp:RequiredFieldValidator>--%>
<asp:Label ID="lblhrs" runat="server" Visible="False"></asp:Label>
</td>
</tr>
<tr>
<td colspan="2">
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label5" text-align="Right" runat="server" Text="ID"></asp:Label>
</td>
<td>
<asp:Label ID="lblid" runat="server"></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label19" runat="server" Text="Comname"></asp:Label>
</td>
<td>
<asp:DropDownList ID="rldlstcomname" runat="server" AutoPostBack="True" OnSelectedIndexChanged="rldlstcomname_SelectedIndexChanged"
CssClass="dropdown">
<asp:ListItem Text="<-Select->" Selected="True"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="rldlstcomname"
ErrorMessage="*" InitialValue="<-Select->" ValidationGroup="s+u" ForeColor="#FF0066"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label18" runat="server" Text="Brand_Name"></asp:Label>
</td>
<td>
<asp:DropDownList ID="rldlstbrand" runat="server" CssClass="dropdown" AutoPostBack="True"
OnSelectedIndexChanged="rldlstbrand_SelectedIndexChanged">
<asp:ListItem Text="<-Select->" Selected="True"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label6" runat="server" Text="Zone"></asp:Label>
</td>
<td>
<asp:DropDownList ID="ddlZone" runat="server" CssClass="dropdown" OnSelectedIndexChanged="ddlZone_SelectedIndexChanged"
AutoPostBack="True">
<asp:ListItem Text="<-Select->" Selected="True"></asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="ddlZone"
ErrorMessage="*" InitialValue="<-Select->" ValidationGroup="s+u" ForeColor="#FF0066"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label8" runat="server" Text="Location"></asp:Label>
</td>
<td>
<asp:DropDownList ID="ddllocation" runat="server" CssClass="dropdown" OnSelectedIndexChanged="ddllocation_SelectedIndexChanged">
<asp:ListItem Text="<-Select->" Selected="True"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label1" runat="server" Text="Program"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtprogram" runat="server" CssClass="textbox"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label7" runat="server" Text="Venue Name"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtVenueName" runat="server" CssClass="textbox"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label9" runat="server" Text="Venue"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtvenue" runat="server" CssClass="textbox"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label10" runat="server" Text="VenueEmail"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtvenueEmail" runat="server" CssClass="textbox"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label11" runat="server" Text="VenueMobile"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtvenuemob" runat="server" CssClass="textbox"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label12" runat="server" Text="VenueContactPerson"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtconperson" runat="server" CssClass="textbox"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label13" runat="server" Text="AddtionalName"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtAddname" runat="server" CssClass="textbox"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label14" runat="server" Text="AddtionalMobile"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtAddmob" runat="server" CssClass="textbox"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label15" runat="server" Text="VenueVendorEmail"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtvenuevendoremail" runat="server" CssClass="textbox"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label16" runat="server" Text="VenueVendorMobile"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtvenuevendormob" runat="server" CssClass="textbox"></asp:TextBox>
</td>
</tr>
<tr>
<td>
<asp:Label ID="Label17" runat="server" Text="VenueVendorName"></asp:Label>
</td>
<td>
<asp:TextBox ID="txtvenuevendorname" runat="server" CssClass="textbox"></asp:TextBox>
</td>
</tr>
<tr>
<td><asp:Button ID="deletebtn" runat="server" CssClass="btn btn-link" Text="Yes" Width="153px" Visible="false"/></td>
<td><asp:Button ID="btnno" runat="server" CssClass="btn btn-link" Text="No" Width="153px" Visible="false"/></td>
</tr>
</table>
</div>
</div>
</div>
</div>
<!--modal end-->
</asp:UpdatePanel>
Need the answer as soon as possible
thanks in advance
From my past experience, all HTML tags and other editor server controls that work inside UpdatePanel must be enclosed by ContentTemplate property tag:
<asp:UpdatePanel ID="UpdPanel" runat="server">
<ContentTemplate>
<div class="modal fade" id="Addmodal" role="dialog">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
X
<h4 class="modal-title" style="color:red">Add</h4>
</div>
<div class="auto-style10" style="margin-top:11px; margin-bottom:7px;">
<p><u>Don't Leave Empty Field Please Fill 'N.A' There !! <b> : </b></u><br /><br />
</p>
<table style="float:right;">
<%-- simplified for brevity --%>
</table>
</div>
</div>
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
If you have ScriptManager tag before UpdatePanel, make sure UpdatePanel placed outside the tag, since you should not put any tags inside ScriptManager control.

how to record the input time on a textbox control in asp.net

i have been working on some assignment and was facing a problem...
how to record the input time on a text-box control in asp.net
that is the timer starts at the time when i start to input in the text-box and stops when i move to the next text-box or move to any other control.. ??
<table style="width: 685px">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<tr>
<td colspan="3">
<asp:Image ID="Image1" runat="server" Height="174px" ImageUrl="~/Registration/images/registerwithus.jpg"
Width="605px" />
</td>
</tr>
<tr>
<td>
User Name
</td>
<td colspan="2">
<asp:TextBox ID="TextBox1" runat="server" ontextchanged="TextBox1_TextChanged"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1"
ErrorMessage="Please Enter the correct Name" ForeColor="Red"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="style5">
Choose Password
</td>
<td colspan="2">
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox2"
ErrorMessage="Choose Password" ForeColor="Red"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="style5">
Confirm Password
</td>
<td class="style6" colspan="2">
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TextBox3"
Display="Dynamic" ErrorMessage="Choose Password" ForeColor="Red"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="TextBox2"
ControlToValidate="TextBox3" Display="Dynamic" ErrorMessage="Both the Password fields do not match"
ForeColor="#CC0000" SetFocusOnError="True"></asp:CompareValidator>
</td>
</tr>
<tr>
<td class="style5">
Email Id
</td>
<td class="style6" colspan="2">
<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="TextBox4"
Display="Dynamic" ErrorMessage="Enter your EmailId" ForeColor="Red"></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TextBox4"
Display="Dynamic" ErrorMessage="Invalid Email Id" ForeColor="Red" ValidationExpression="\w+([-+.']\w+)*#\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td>
Mob No
</td>
<td colspan="2">
<asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ErrorMessage="Invalid Mobile No."
ControlToValidate="TextBox5" ForeColor="Red" ValidationExpression="^[7-9][0-9]{9}$"></asp:RegularExpressionValidator>
</td>
</tr>
You can start the timer on focus event and stop it on blur event.
Here is a sample
$(function(){
$("#<%=TextBox.ClientID%>")
.focus(function () {
// Start Timer
})
.blur(function () {
// Stop Timer
});
)};

2 jQuery script on same page

I have 2 jQuery script in one page jQuery Dialog and jQuery slideToggle inside the dialog box, jQuery dialog is working but after hitting button to open jQuery Dialog inside the dialog box there will be a button to slideToggle a div but its not working I tried to move slideToggle outside the dialog and it works. I don't know whats going on inside the dialog box if someone can help me to solve my problem
jQuery Dialog
<script type="text/javascript">
$(function () {
$("#dialog").dialog({
appendTo: "form",
autoOpen: false,
width: 630,
height: 700,
draggable: false,
resizable: false,
modal: true
});
$("#btnaddnew").click(function () {
$("#dialog").dialog("open");
return false;
});
});
</script>
jQuery slideToggle
<script type="text/javascript">
$(document).ready(function () {
$("#Div1").hide();
$("#Button1").click(function () {
$("#Div1").slideToggle();
return false;
});
});
</script>
dialog div + slideToggle div inside the jQuery dialog
<div id="dialog" title="Classification">
<asp:UpdatePanel ID="addpanel" runat="server">
<ContentTemplate>
<table>
<tr>
<td><div id="registerform">
<table align="center" style="margin-top:10px" width="600">
<tr>
<td>
<asp:DropDownList ID="DropDownList1" runat="server"
onselectedindexchanged="DropDownList1_SelectedIndexChanged"
AutoPostBack="True">
<asp:ListItem Selected="True">Choose Classification</asp:ListItem>
<asp:ListItem Value="Resident">Resident</asp:ListItem>
<asp:ListItem Value="Business">Business</asp:ListItem>
</asp:DropDownList>
</td>
</tr>
</table>
<table>
<tr>
<td><div id="divresident" runat="server" visible="false">
<table style="margin-top:10px; margin-bottom:10px">
<tr>
<td width="300" style="text-align:left"><asp:Label ID="lbAddress" runat="server" Text="Address"></asp:Label></td>
<td width="300"><asp:TextBox ID="txtAddress" class="basetxt" runat="server" Width="290"></asp:TextBox></td>
</tr>
<tr>
<td style="text-align:left"><asp:Label ID="lbUserEntry" runat="server" Text="Number of House occupant"></asp:Label></td>
<td><asp:TextBox ID="txtUserEntry" class="basetxt" runat="server" Width="290"></asp:TextBox></td>
</tr>
<tr>
<td style="text-align:left"><asp:Button ID="btnAddOccupant" runat="server" Text="+" />
<asp:Label ID="lbres5" runat="server" Text="Add Occupant"></asp:Label></td>
</tr>
<tr>
<td>
<div id="divOccupantProfile" style="display: none">
<asp:Label ID="OPfamilyname" runat="server" Text="Family Name"></asp:Label>
<asp:TextBox ID="textOPfamilyname" runat="server"></asp:TextBox><br />
<asp:Label ID="OPfirstname" runat="server" Text="First Name"></asp:Label>
<asp:TextBox ID="textOPfirstname" runat="server"></asp:TextBox><br />
<asp:Label ID="OPmiddlename" runat="server" Text="Middle Name"></asp:Label>
<asp:TextBox ID="textOPmiddlename" runat="server"></asp:TextBox><br />
<asp:Label ID="OPmaritalstatus" runat="server" Text="Marital Status"></asp:Label>
<asp:DropDownList ID="ddlOPmaritalstatus" runat="server" >
<asp:ListItem></asp:ListItem>
<asp:ListItem>Married</asp:ListItem>
<asp:ListItem>Single</asp:ListItem>
<asp:ListItem>Divorced</asp:ListItem>
</asp:DropDownList><br />
<asp:Label ID="OPoccupation" runat="server" Text="Occupation"></asp:Label>
<asp:TextBox ID="textOPoccupation" runat="server"></asp:TextBox><br />
<asp:Label ID="OPrelationship" runat="server" Text="Relationship"></asp:Label>
<asp:DropDownList ID="ddlOPrelationship" runat="server" >
<asp:ListItem></asp:ListItem>
<asp:ListItem>Wife</asp:ListItem>
<asp:ListItem>Daughter</asp:ListItem>
<asp:ListItem>Son</asp:ListItem>
<asp:ListItem>Father</asp:ListItem>
<asp:ListItem>Mother</asp:ListItem>
<asp:ListItem>House helper</asp:ListItem>
<asp:ListItem>Driver</asp:ListItem>
</asp:DropDownList>
</div>
<div id="holder">
</div>
</td>
</tr>
</table>
</div></td>
</tr>
</table>
<table>
<tr>
<td><div id="divbusiness" runat="server" visible="false">
<table width="600" style="margin-top:10px; margin-bottom:10px">
<tr>
<td width="300" style="text-align:left"><asp:Label ID="lbbus1" runat="server" Text="Registered Business Name" ></asp:Label></td>
<td width="300"><asp:TextBox ID="txtbus2" class="basetxt" runat="server" Width="290"></asp:TextBox></td>
</tr>
<tr>
<td width="300" style="text-align:left"><asp:Label ID="lbbus3" runat="server" Text="Address"></asp:Label></td>
<td width="300"><asp:TextBox ID="txtbus4" class="basetxt" runat="server" Width="290"></asp:TextBox></td>
</tr>
<tr>
<td width="300" style="text-align:left"><asp:Label ID="lbbus5" runat="server" Text="Structure"></asp:Label></td>
<td width="300"> </td>
</tr>
<tr>
<td width="300" style="text-align:left"><asp:Label ID="lbbus6" runat="server" Text="SEC No./DTI number"></asp:Label></td>
<td width="300"><asp:TextBox ID="txtbus7" class="basetxt" runat="server" Width="290"></asp:TextBox></td>
</tr>
<tr>
<td width="300" style="text-align:left"><asp:Label ID="lbbus8" runat="server" Text="Nature of Business"></asp:Label></td>
<td width="300"><asp:TextBox ID="txtbus9" class="basetxt" runat="server" Width="290"></asp:TextBox></td>
</tr>
<tr>
<td colspan="2" style="text-align:left">
<div>
<asp:Button ID="Button1" runat="server" Text="+" />
<asp:Label ID="Label1" runat="server" Text="Add Phone"></asp:Label>
<div id="Div1" style="display: none">
<asp:Label ID="Label2" runat="server" Text="Landline work"></asp:Label>
<asp:TextBox ID="TextBox1" class="basetxt" runat="server" ></asp:TextBox><br />
<asp:Label ID="Label3" runat="server" Text="Handphone personal" ></asp:Label>
<asp:TextBox ID="TextBox2" class="basetxt" runat="server"></asp:TextBox><br />
<asp:Label ID="Label4" runat="server" Text="Handphone work"></asp:Label>
<asp:TextBox ID="TextBox3" class="basetxt" runat="server"></asp:TextBox>
</div>
</div>
</td>
</tr>
</table>
</div></td>
</tr>
</table>
</table>
</ContentTemplate>
</asp:UpdatePanel>
</div>
.click won't work on later loaded elements, try it like this, replace:
$("#Button1").click(function () {
With:
$("body").on('click', '#Button1', function() {

Categories