I'm having issues with a MaskedEdit on a textbox. I am using the the ClearTextOnInvalid property to prevent my user from inserting invalid information but when it deletes the text in textbox it does not clear the Mask.So if the user decides not to put anything in the box, I believe my code is seeing the mask as an invalid string. Is there a way to clear the mask after someone clicks out of the textbox? The ClearMaskOnLostFocus property is not working from textbox to textbox, only when no object has focus.
I want to save the input mask used in the control, but ONLY if a valid value was entered. In this markup, the mask is properly displayed and stored even if the user doesn't enter anything. Since a zero-length string is a valid value, the entered value is being stored in the database as (___) ___-____ If there is no value entered, the value stored should be a zero length string.
how to programatically set via javascript the value for a textbox which has a maskededitextender tied to it? tried document.getElementById("textboxid").value but it didnt work.
I'm using AjaxToolkit and it works just fine. In one form i'm using the Time field (MaskedEdit). I need to validate Time field only if a tickbox is ticked. Is it possible?
I'm facing an issue with chrome. I have multiview in which user control is loaded. This user control has one maskedEditExtender textbox (telephone textbox in ___-___-____ format). Issue is whenever the control is loaded i cannot see the masked feild but as soon i refresh the page I see it. I tried the script above but it didnt worked.
We are using a MaskEditValidator to validate users input in a textbox which expects a date.
[Code]....
Our problem is that we would like that the textbox accepts two formats of date DD/MM/YYYY and DD/MM/YY, Can be possible to specify two types of mask in a MaskEditValidator ? Another idea how can we do this that users can enter the dates in the two formats and validate it ?
I have holiday manage screen (a date can be assigned with holiday)...so when user click on calendar I need to mask the days which are allocated with holidays...how to acheive this..
If possible can we show the title as holiday name when user mouse overs on date in the calendar
Breaking out the required field validation helped me get the date textbox to behave the way I need. Just positioning validation messages and such. Behavior I like here is that TextBox has no mask to start (focus off of textbox). When you put the cursor in the textbox or the textbox gets focus then the mask shows up: __/__/____. As you type the underscore placeholders dissapear but the '/' chars stay in place.
And finally, this is key, when you have a correct date and take the focus away from the text box the dashes stay in place. I just realized that is because the date mask seems to fill in the blank spaces with the current date. I cannot get this behavior with a phone. Granted there is no phone mask type. Here is the phone code:
I have tried MaskType set to number but it doesn't change the behavior. Right now the dashes dissapear when I take the focus off of the phone textbox. One thing I noticed with date is that if it is incomplete when it loses focus it fills in the rest with the current date values. Since there is no Phone mask type that behavior is not built in. Does anyone know how to set a default behavior so if you type in 55 in would automatically finish? 555-55-5555 And when you take the focus off it would keep the dashes. But if the textbox is empty I want with no focus the mask should dissapear completely.
I am using the AJAX Toolkit MaskedEditExtender to format some of my web form's textboxes. When I load the page and start to enter data into the textboxes, the masking doesn't show. I've included my page code below:
I'm trying to use the TextBoxWatermarkExtender with MaskedEditExtender/Validator and have found a bug (I think).
In the textbox I enter an invalid date such as 55-55-5555 and exits the textbox. I would then expect the watermark to be shown, but it doesn't. Instead the prompchar is shown (like __-__-____).
If I simply give focus to the textbox and then another control, the watermark is shown.
Is there a workaround such as manually force the TextBoxWatermarkExtender to update.
I'm not the best with javascript, I tried to call focus() and blur() on the textbox in the textbox's onBlur event using window.setTimeout. This works in Firefox, but not IE8, also there has to be a better way I think :-)
I have a user control which contains a text box, which is added dynamically to another control containing a repeater control and then finally to the aspx. As my user control with the text box is added dynamically using code, I have learnt that using JQuery to apply a date mask won't because it is added to a placeholder and thus the id of the textbox control won't be found by the JQuery, which goes a long way to explain my problems.
Prior to trying out JQuery, I used AJAX third party control from codeplex, but I had to drop that control because of other issues.
Therefore, is there a way for me to apply a mask, such as "__/__/____" to a text box that does not reply on AJAX or JQuery?
using java script with update panel. I have checkbox, textbox with MaskedEditExtender inside update panel in web content form. I want to change the mask for MaskedEditExtender when I check the checkbox without doing pastback for the update panel using java script
I want a TextBox with a mask like (xxx) xxx-xxxx using a MaskedEditExtender. I tried to set up the mask property to "(999) 999-9999" or "(999) 999-9999" but nothing works. It there a way I can have the mask I want?
why does the MaskedEdit not allow you to enter a 0 as the only character to the left of the decimal separator when the InputDirection is set to RightToLeft? Entering a 0 simply does nothing, and when checking the behavior script I discovered that the script actually checks in the key press event if the characters is a 0 and then does not add it to to the content. The MaskedEdit is setup as follows:
I ran into a strange issue with the AJAX MaskedEditExtender control, the extender is used with the Mask="99/99/9999" and MaskType="Date". Initially when the page loads the textbox was set to readonly using textbox.Attributes.Add("readonly", "readonly") in the codebehind. After the page loads if the user clicks on a certain button it would change the textbox to editable using javascript code: textbox.readOnly = false. The strange thing is after that if you start typing in the textbox you can see the entire mask (__/__/____) shifting to the right as you type. For example it looks something like this: 09__/__/____ instead of the normal 09/__/____.
If the textbox was never set to readonly in the first place this behavior won't happen. So it seems something got messed up when changing from readonly to not. I was able to reproduce this in a barebone aspx page with just the textbox, the mask extender, and a button that when clicked turning off the textbox's readonly. Anyone knows how I can fix this?
I have put one mask edit extender for a textbox which is inside a Gridview templete field and the MaskType="Number
Mask="99,99,999.99"My problem is described below Commas are not dispalying inside the GRidView.After clicking in the textbox its coming and immediately vanishing.
e.g. after typing it should come like this 34,56,789.00 but its coming like 3456789.00
I have confronted a problem of using MaskedEditExtender when try to restrict user to input a number mask with mask. User input of course has no problem. The problem is when the system get the value from database or somewhere (doing assignation), the textbox show the wrong value with the following mask setting: I am writing to contribute and share my solution: example:
textbox1: 1.1 (user input) by using the following mask: <asp:MaskedEditExtender ID="meeXML" runat="server" TargetControlID="textbox1" Mask="999.99" MessageValidatorTip="true" OnFocusCssClass="MaskedEditFocus" OnInvalidCssClass="MaskedEditError" MaskType="Number" InputDirection="RightToLeft" AcceptNegative="Left" ClearMaskOnLostFocus="True" ErrorTooltipEnabled="True"/> When the system get back the data, textbox1 will show: textbox1: 0.11 <- that is not the actual what I want: ========================================== the solution: ========================================== <asp:MaskedEditExtender ID="meeXML" runat="server" TargetControlID="textbox1" Mask="NNNNNNNNNNNN" MessageValidatorTip="true" OnFocusCssClass="MaskedEditFocus" OnInvalidCssClass="MaskedEditError" MaskType="Number" InputDirection="RightToLeft" AcceptNegative="Left" ClearMaskOnLostFocus="True" Filtered="." ErrorTooltipEnabled="True"/>
I have found a problem with the Masked Edit Extender when using it with a culture of Azeri (Latin, az-Latn-AZ). I have not found anywhere that states that the control should not be used with languages that is not included in the list of languages that the ajax control toolkit is translated.
The currency symbol for Azeri is "man." the first problem is that the mask displays this as "man," but the comma is the decimal indicator for Azeri.
Scenario 1
When the DisplayMoney property is set to "right" and the currency is removed by the masked editors script the resulting value looks something like "12,12," the second comma then invalidates the numeric value and all my compare validator which also acts on the same textbox keeps failing because the value is not numeric.
Scenario 2:
When the DisplayMoney property is set to "left" there is always a "0," added to the string because the the script of the masked editor removes the man then gets to the comma (man",") sees it as a decimal indicator and adds the 0 before the comma this happens on the first blur of the textbox each resulting onblur event will add another 0 to the value. But the value is already invalidated by the fact that it again has two commas like 0,12,12.
I get this result even with the Ajaxcontroltoolkit sample site, the changes needed to sample site's MaskedEdit.aspx page can be seen below.
For scenario 1, change the first MaskedEditExtender on the MaskedEdit.aspx page to the following:
[Code]....
For scenario 2 effect change the first MaskedEditExtender on the MaskedEdit.aspx page to the following:
Long ago, I created an ASPNET user for development use.However, every time I boot up my dev system, I'm presented with a user login for ASPNET, among others.I don't want to remove ASPNET; I need it for dev work.But how do I keep it from appearing among the list of User Logins available at boot-up?