Masked Edit Extender Textbox

Posted on 2009-12-24
Medium Priority
Last Modified: 2013-11-26
I have a textbox with an added masked edit extender that populates data.  The mask is set to 99,999 and the mask type is set to number.  Whenever I populate my data, instead of pulling the correct data,  the textbox populates $_0,000 regardless of when the amount should be $5000. I set the mask type to none but now the data pulls as 50,000.  Is there any way in the extender to fix that problem?  Or does it have to be done in the code behind?
Question by:dlavar
  • 2
  • 2
LVL 18

Expert Comment

ID: 26122184

Please post your code, both markup and code-behind.

LVL 15

Accepted Solution

rajeeshmca earned 1000 total points
ID: 26122501

 <cc1:MaskedEditExtender ID="MaskedEditExtender1"






This should work.

Author Comment

ID: 26131622
Sorry I'm just getting back with you guys.  Long weekend.
But here's the html source code that I have.  I don't have any vb code.

<cc1:MaskedEditExtender ID="txtAmount_MaskedEditExtender" runat="server" 
                            ClearMaskOnLostFocus="False" ClearTextOnInvalid="True" 
                            CultureAMPMPlaceholder="" CultureCurrencySymbolPlaceholder="" 
                            CultureDateFormat="" CultureDatePlaceholder="" CultureDecimalPlaceholder="" 
                            CultureThousandsPlaceholder="" CultureTimePlaceholder="" DisplayMoney="Left" 
                            Enabled="True" InputDirection="RightToLeft" Mask="99,999.99" 
                            TargetControlID="txtAmount" PromptCharacter="0">

Open in new window


Author Comment

ID: 26131840
Rajeeshmca, I'm sorry I wasn't clear.  I need the value to populate with the commas also.  
For example : $5,000 or 05,000
LVL 15

Assisted Solution

rajeeshmca earned 1000 total points
ID: 26135903
Hi dlavar,

Try the below one, it works great for me.  

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default4.aspx.vb" Inherits="Default4" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<form runat="server" id="form1">
<asp:ScriptManager ID="Scr1" runat="server"></asp:ScriptManager>

    <input type="text" id="op" onkeypress="return checkDecimal(event,this);" />
    <asp:TextBox ID="MaskTextBox" runat="server" >
    <cc1:MaskedEditExtender ID="txtAmount_MaskedEditExtender" runat="server"
                            ClearMaskOnLostFocus="False" ClearTextOnInvalid="True"
                            DisplayMoney="Left"  MaskType="Number"
                            Enabled="True" InputDirection="RightToLeft" Mask="99,999.99"
                            TargetControlID="MaskTextBox" PromptCharacter="0">
    <asp:Button ID="SubButton" runat="server" Text="SubButton" />                    

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question