AJAX :: Using "MaskedEditExtender" Along With "MaskedEditValidator"?

Mar 11, 2011

I am Using "MaskedEditExtender" along with "MaskedEditValidator" in my page with a textbox. it is not working and showing the NullReference exception. the call stack showing the following details

[NullReferenceException: Object reference not set to an instance of an object.]
AjaxControlToolkit.MaskedEditValidator.OnPreRender(EventArgs e) in C:UsersswaltherProjectsAspNetAjaxReleases30930AjaxControlToolkitSourceAjaxControlToolkitMaskedEditMaskedEditValidator.cs:384

View 3 Replies


Similar Messages:

AJAX :: Configure MaskedEditExtender & MaskedEditValidator?

Oct 13, 2010

have a C#/ASP.NET web application that contains DetailsView controls that are used for CRUD operations through the EntityDataSource and Entity Framework. Unfortunately I'm not sure which forum would be best to post this under, since I am wondering whether either the MaskedEdit AJAX controls or Entity Data Model could be configured to allow for this.ProblemThe Entity Framework requires time fields to be of time(7) data type, which must be entered as 24-hour time, with seconds (e.g. '09:30:00'). However, I want the time entered in 12-hour time and without seconds (e.g. '9:30 AM'). Is there a way I can configure the MaskedEditExtender and/or MaskedEditValidator to allow for this. What I was thinking is possibly using the AutoComplete portion of this control to fill in the remaining portions (i.e. seconds) that the user does not enter, but which the EF requires. Either that or can the Entity Data Model or something else be configured to allow for this?Existing Code

<asp:TemplateField HeaderText="Start Time" SortExpression="StartTime">
<EditItemTemplate>
<asp:TextBox ID="txtStartTimeEdit" runat="server" Text='<%# Bind("StartTime") %

[code]...

View 3 Replies

Using AJAX MaskedEditExtender And MaskedEditValidator To Validate The Phone?

Feb 6, 2010

I have text box to enter a phone number. I'm using AJAX MaskedEditExtender and MaskedEditValidator to validate the phone.I have no problem with mask but the problem nothing happen when I enter for example only 3 number then lose the focus but as soon the focus on I will see the error message and it will disappear as soon as I write one number.

all what I want to get the error message if the user did not enter 9 numbers after lose the focus.

here is my code: <asp:TextBox ID="txtHomePhone" runat="server" ontextchanged="txtHomePhone_TextChanged"></asp:TextBox>

<cc1:MaskedEditExtender ID="txtHomePhone_MEExt" runat="server" TargetControlID = "txtHomePhone" Mask = "(999)999-9999" MaskType ="Number" AutoComplete="False"
[code]....

View 4 Replies

AJAX :: MaskedEditExtender And MaskedEditValidator Causing Refresh/postback?

Sep 7, 2010

I have the following tabpanel (it actually contains a bit more content, but that content doesnt influence my issue):

[code]....

When I remote the MaskedEditExtender and MaskedEditValidator, it doesnt show that (undesired) behaviour anymore.Is there something special these controls do that cause them to refresh? Is there a workaround for this?

View 1 Replies

How To Use MaskedEditExtender And MaskedEditValidator

Feb 20, 2010

Well i cannot find a solution,so..

I will post my code.The problem is that whatever date i try (i use greek d/m/y but i also tried m/d/y) it gives me the "error!" tooltip.

I've tried complex code,simple code, ValidationExpression,Globalization,no globalization.Nothing works.
Anyway to it's simplest form:

Code:

[code]....

View 10 Replies

AJAX :: MaskedEditValidator / Strange Behaviour?

Dec 20, 2010

I am using the MaskedEditExtender and MaskedEditValidator, but have experienced some strange
behaviour. (See code example below). When entering a date into the textbox this is what I see:

1. The mask

2. Entering the date and time e.g. "19-01-1980 10:11:12"

3. When removing focus from the textbox the result is: "19-01-1980 19:01:19"

The six first digits of the date is copied as the time? If entering a day of the month larger than 23 and any given month, year and time (eg. 25-10-1980 12:12:12) the validation fails as the six first digits are copied to the time resulting in a time 25:10:19 which obviously is not valid.

I have downloaded the AJAX toolkit sample code and experience the exact same behaviour. When running the AJAX Toolkit samples from[URL] works fine!

Additinal info: Culture is danish (DateTime format is dd-MM-yyyy hh:mm:ss). Tried changing my systems culture to en-US but same behaviour.

Code:

[Code]....

View 5 Replies

AJAX :: Disable MaskedEditValidator Through JavaScript?

May 13, 2010

I'm trying to disable a MaskedEditValidator control through JavaScript.

The following approach works for other types of validors (RequiredFieldValidator) but doesn't seem to work for the MaskedEditValidator

[Code]....

View 2 Replies

AJAX :: MaskedEditValidator And MinimumValue Property - How To Set Dates

Feb 16, 2011

I have 2 scenarios here for using the MaskedEditValidator for a date field. I'll start with the easier one first.

1) I have a date field. I want to set the MaskedEditValidator's minimum value property to TODAY's date. So for example, if the user enter's a date earlier than today, the AJAX control will show a message stating "you can't input a date earlier than today".

2) I have 2 date fields - 1st one is 'start date' and 2nd one is 'end date'. I want to set the MaskedEditValidator for the end date so that the minimum value property is the date from the 'start date' field. So this way, the user can't enter a date in the 'end date' field that is earlier than what is in the 'start date' field.

Are these 2 scenarios possible? Or should I try another option (Javascript, Jquery, etc...)?

View 1 Replies

AJAX :: MaskedEditValidator And Panel's DefaultButton Not Working?

Mar 16, 2010

I have a panel, with several textboxes and an ImageButton inside of it. One of the textboxes has a MaskedEditExtender and a MaskedEditValidator associated with it. When I hit enter from any other textbox besides the one with the MaskedEditValidator the defaultbutton that is defined in the Panel's DefaultButton property handles the enter key.However, when I am in the textbox with the MaskedEditValidator, the first button on the form is receiving the enter key. Now, if I take the MaskedEditExtender off of the page, and just leave the MaskedEditExtender, everything behaves as it should.Can anyone offer any insight into how I may get this to work properly, or is this a known bug?I tried searching the forums and found a similar post, but no conclusion was ever reached.

View 3 Replies

AJAX :: MaskedEditValidator Outside Gridview Disable Delete Command In ItemTemplate Field

Jul 8, 2010

Something "weird" is happening with my ASP.NET application. I have a MasterPage with WebForms, and inside one of them, I have an ASP TextBox which is controlled by the MaskedEditExtender/MaskedEditValidator couple. Underneath, I have a GridView with 2 columns, an Edit ASP Command Field, an ItemTemplate which contains an ASP ImageButton with a Delete CommandName linked to a GridViewDelete Event through the OnRowDeleting attribute. The GridView is binded with SQL Server data while the page is loading.

It appears that once the page is loaded, if I want to delete a row by clicking on the ASP ImageButton, nothing appears. I have first to do something else with the GridView (raise an Edit Event for example), then it's accessible. I try different stuff to catch the source of the problem, and the "weird" part appeared when I deleted the MaskedEditValidator, just keeping the MaskedEditExtender : the Delete ASP ImageButton worked since the page loads!

View 2 Replies

AJAX :: Removed-added The Toolkit Toolbox / The Error Occurs P.e. In MaskedEditvalidator?

Feb 19, 2010

So basically when i open the page i get the error above.

I've removed-added the toolkit toolbox.The error occurs p.e. in MaskedEditvalidator when i remove the mask from

MaskedEditExtender.Ok i know that it probably needs a mask and it crashes but what the hell is the

C:UsersswaltherProjectsAspNetAjaxReleases30930AjaxControlToolkitSourceAjaxControlToolkitMaskedEditMaskedEditCommon.cs ?? I don't even use c: for any project.Who is swalther?WTH?

And is there a MaskedEditCommon.cs in the toolkit?I did not find any MaskedEditCommon.cs in whatever, version library or whatever i downloaded.

Error:[ArgumentOutOfRangeException: StartIndex cannot be less than zero. Parameter name: startIndex] System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) +7490863 System.String.Substring(Int32 startIndex, Int32 length)

View 1 Replies

AJAX :: Can Use A MaskedEditExtender With A Combo Box

Feb 23, 2011

I want masked ComboBox, so I use a MaskedEditExtenderwith a ComboBox. The two controls came from the ajax control toolkit. But I got an error: "Unable to cast object of type 'AjaxControlToolkit.ComboBox' to type 'System.Web.UI.WebControls.TextBox'". Is there a way a can use a MaskedEditExtender with a combo box?

View 4 Replies

AJAX :: MaskedEditExtender Multilanguage?

Sep 26, 2010

<cc1:MaskedEditValidator
ID="MaskedEditValidator5"
runat="server" [code]....

View 1 Replies

AJAX :: MaskedEditExtender Decimal Values?

May 10, 2010

I am using MaskedEditExtender on my textbox.Set the masktype to number.Now the user can enter decimals also at any place to my textbox.Is it possible for my MaskedEditExtender to still accept that or I have to use custom javascript/ regex for this.

View 5 Replies

AJAX :: MaskedEditExtender Gets Focus On Postback?

Sep 2, 2010

I'm having a really strange issue with the MaskedEditExtnder. I've attached some markup for one of the textboxes. I'm using a MaskedEditExtender and MaskedEditValidator along with a CalendarExtender so the user has the option to type the date or click on an image and pick the date.

So, if I enter/pick a date then select a control that forces a postback (usually a dropdownlist but not always) when the page is returned the focus goes back to the textbox I just entered the date in. So what about the MaskedEdit, MaskedEditValidator, CalendarExtender would cause the page to return focus to the control being extended? See markup below - am I missing something??

[Code]....

View 3 Replies

AJAX :: MaskedEditExtender Not Functioning Properly

Jun 7, 2010

I'm having a issue with a MaskedEditExtender, I am using it for a datetime field with the sqltable field definition as smalldatetime, I have several error messages such as emptyvalue error message, minimium value error message along with a few others.

Everything works fine until i put a maximium value, on selecting either insert or edit it throws the error even if the date entered is between the minimium value and the maximium value and will not go away. As you are aware smalldatetime has a max value of 06/06/2079 which won't be a issue in my lifetime but for validation purposes I want to make sure the user doesn't accidentally enter a value larger than the max value thus causing an error on insert or edit.

View 6 Replies

AJAX :: How To Clear The Textbox Associated MaskedEditExtender

May 24, 2010

the code like below, how to clear tbxDate when input an invalid date use javascript

[Code]....

View 3 Replies

AJAX :: Strange Results With MaskedEditExtender?

Oct 12, 2010

I've inherited a web project from another company, and I'm having a weird issue with a phone number mask.

If the ClearMaskOnLostFocus is "true", I lose the mask in the edit field (this is a editing screen for an existing record). If set to false, the mask is present, but the leading digit is truncated, and will write back to the DB an incorrect number if submitted, with that leading "_".

True = 8885551212
False=(_88)-555-1212
The DB field a a varchar(20) -- don't ask me why.
<asp:MaskedEditExtender ID="MaskedEditExtender3" runat="server"
learMaskOnLostFocus="true" MaskType="Number"
Enabled="True" Mask="(999) 999-9999"
TargetControlID="Phone_Number">
</asp:MaskedEditExtender>

I'm recently back at work after a long layoff period, and my ASP is a little rusty.

View 1 Replies

AJAX :: Can't Add A MaskedEditExtender To A Template Field?

Nov 27, 2010

I've added a script manager control to an ASP.NET page. And I've also got a details view control on the page. I've converted a couple of the fields to template fields, because I want to add a MaskedEditExtender to the textboxes in the fields (one fieldis associated with a time field in the database, and the other field is associated with a datetime field in the database, so I want to put a MaskedEditExtender into the template field to associate with the textboxes there. However, no matter how many timesI try to copy the MaskedEditExtender into the template field, VS 2010 will not let me.

View 13 Replies

AJAX :: Conflict Between AsyncfileUpload And MaskedEditExtender?

Jan 28, 2010

i have a page with both AsyncfileUpload and MaskedEditExtender.When I try to upload a pic through the asyncfileupload, I get a jscript error whilst debugging.The dynamic code is below, the error arises here: if (document.activeElement) .Anyone knows how to solve this??

[Code]....

View 2 Replies

AJAX :: Using Web User Control With MaskedEditExtender?

May 15, 2010

I am using Web User control with MaskEditExtender and MaskEditValidatore .

In asp.net page it works good but if I load it into Modal Popup (using LoadControl in webservice), I can see only the Textbox.

View 2 Replies

AJAX :: MaskedEditValidator Page.IsValid Returns False When Using "en-UK" Culture?

Feb 4, 2011

[Code]....

The following setup seems to work fine on the client side, however when I post back and check Page.IsValid, the value is false. I also looked at mevDate.IsValid and it's false. It seems that setting the CultulreName on the MaskedEditExtender is sufficient to get the MaskedEditValidator to emit the correct JavaScript, but on the server side of things it doesn't work. When I flip CultureName to "en-US" everything works as expected.

View 3 Replies

AJAX :: CalendarExtender Combined With MaskedEditExtender Not Working

Feb 16, 2010

I have a textbox with a calendar extender.

When a date on the calendar is clicked the textbox is filled with the date value in format: dd-mm-yyyy That works...but now I added a MaskedEditExtender on that same textbox field. Now when a date in the calendar extender is clicked the focus is set on the textbox field, the mask shows, but the values are not filled in!

I also checked this post:[URL]but that didn.

Here's my code

[code]....

View 8 Replies

AJAX :: MaskedEditExtender And CalendarExtender / Is Is Possible To Make It Insert 20 Instead Of 00

Nov 19, 2010

On the AjaxControlToolkit samplepage. The third control is a calendar, if you enter 10/10/10 and exit the textbox, the value is changed to 10/10/0010.

If the two first digits in the year if left out, is is possible to make it insert 20 instead of 00, to get 10/10/2010 ?

View 7 Replies

AJAX :: MaskedEditExtender Looses Format When Not In Focus?

Sep 23, 2010

I have a tex box which I'm using to capture a bank sort code.

I want to use the AJAX MaskedEditExtender so the user only ever inputs the data in this format 12-34-56.

Here is my extender code:

[Code]....

This initially works fine, however when i remove the focus on this text box the input removes any hyphen and the texbox value is left like this 123456.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved