Hi, I am using ajax extenders to enhance the functionality of my web site. NOw problem is that i have made a control which contains following code
1 <asp:TextBox ID="txtDatedDate" runat="server" MaxLength="10" Width="70px" ValidationGroup="TitleSave"></asp:TextBox>
2 <asp:ImageButton ID="ibtnDatedDate" runat="server" ImageUrl="../Resources/Images/CalendarControlDropDown.GIF"
3 ImageAlign="Top" TabIndex="-1" />
4 <cc1:MaskedEditExtender ID="txtDatedDate_MaskedEditExtender" runat="server" TargetControlID="txtDatedDate"
5 Mask="99/99/9999" MessageValidatorTip="true" MaskType="Date" DisplayMoney="None"
6 AcceptNegative="None" ErrorTooltipEnabled="True">
7 </cc1:MaskedEditExtender>
8 <cc1:CalendarExtender ID="txtDatedDate_CalendarExtender" runat="server" Enabled="True"
9 TargetControlID="txtDatedDate" Animated="False" PopupPosition="TopLeft" PopupButtonID="ibtnDatedDate"
10 Format="MM/dd/yyyy">
11 </cc1:CalendarExtender>
12 <br />
13 <cc1:MaskedEditValidator ID="txtDatedDate_MaskedEditValidator" runat="server" ControlExtender="txtDatedDate_MaskedEditExtender"
14 ControlToValidate="txtDatedDate" SetFocusOnError="true" Display="Dynamic" InvalidValueBlurredMessage="Invalid Date"
15 IsValidEmpty="true" ValidationGroup="TitleSave">
16 </cc1:MaskedEditValidator>
This all code is in a seperate ascx page. I am using this code in my main aspx page. Now if i hide this control inside upadte pannel and set
txtDatedDate_MaskedEditValidator.enabled = false
when I try to submit record i get the following error :-
Microsoft JScript runtime error: 'ctl00_cntplhMain_rpMortgages_ctl01_ucMortgage_ucSuppleme...' is undefined
this error comes on line
headElements[0].appendChild(scriptElement); of Sys$_ScriptLoader$_loadScriptsInternal() function.
i view the scriptElement and i found following script in its outerHTML:
<SCRIPT type=text/javascript>
MaskedEditSetCssClass(ctl00_cntplhMain_rpMortgages_ctl01_ucMortgage_ucSupplementalRecording_ucRecordingInformation_txtRecordedDate_MaskedEditValidator,'MaskedEditError');
</SCRIPT>
How can I fix this issue plz help me its very urgent.
BTW thanks In advance
Thanks,
Zeeshan Umar
~Please Mark As Answer, if one or multiple posts, which helped you in your problem. So that it might be useful for others~
My Blog