Quantcast
Channel: AjaxControlToolkit Work Item Rss Feed
Viewing all articles
Browse latest Browse all 4356

Commented Unassigned: MaskedEditExtender error when assigning value to textbox from variable [27629]

$
0
0
I am using a MaskedEditExtender for my textbox to validate datetime entries. The problem occurs when I assign a value to the textbox using a string variable like so -

string strDateTime = gridViewName.Rows[e.NewEditIndex].Cells[3].Text;
textbox1.Text = String.Format("{0:G}", strDateTime);

The error does not occur when I assign a value like this:
textbox1.Text = String.Format("{0:G}" ,"01/07/2014 01:30:23 PM");

This is my designer code -
<asp:TextBox ID="textbox1" runat="server" CssClass="txtEditPane" ToolTip="mm/dd/yyyy hh:mm:ss"></asp:TextBox>
<div><ajaxToolkit:MaskedEditExtender runat="server" TargetControlID="textbox1" MaskType="DateTime" Mask="99/99/9999 99:99:99" AcceptAMPM="true" AutoComplete="false" ClearMaskOnLostFocus="true" CultureName="en-US"></ajaxToolkit:MaskedEditExtender>

The error message -
0x800a138f - JavaScript runtime error: Unable to get property 'split' of undefined or null reference

Please help.
Comments: Would you please provide a sample project and specify your locale?

Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>