Tracking Forums, Newsgroups, Maling Lists
Home Submit Tracker Forums
  Advanced Search
  HOME    TRACKER    ASP.NET


Advertisements:










AJAX :: Mask Edit Extender With Decimal Value?


I have the following mask edit extender:

<asp:MaskedEditExtender
ID="txtVersion_MaskedEditExtender"
runat="server"
Enabled="True"
Mask="99.99"
MaskType="Number"
TargetControlID="txtVersion">
</asp:MaskedEditExtender>

It allows to type only decimal values, like 15.15. But when I save its value into a decimal variable the format chages to 1515.

Dim Version As Decimal
Version = CDec(txtVersion.Text)


View 5 Replies (Posted: Feb 11, 2011 04:23 PM)

Sponsored Links:

Related Forum Messages For ASP.NET category:
AJAX :: Mask Edit Extender At Runtime?
Im trying to connect up a MaskEditExtender at runtime but the Mask Edit Extender doesnt seem to work.

Heres the code:-

[Code]....

Posted: Nov 02, 2010 10:47 AM

View 2 Replies!   View Related
AJAX :: Mask Edit Extender Not Working Inside Grid?
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

Posted: Mar 03, 2011 08:01 AM

View 2 Replies!   View Related
AJAX :: Masked / Mask Edit Extender Not Displaying Currency Correct When In Number Mode?
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 theajax 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 theninvalidatesthe 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 thefirst MaskedEditExtender on the MaskedEdit.aspxpage to the following:

[Code]....

For scenario 2 effect change the first MaskedEditExtender on the MaskedEdit.aspxpage to the following:

<ajaxToolkit:MaskedEditExtender ID="MaskedEditExtender2" runat="server"

Posted: Mar 03, 2010 02:54 PM

View 3 Replies!   View Related
AJAX :: MaskedEditExtender - Using Mask With Number With Decimal Get The Wrong Initial Bind Value
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"/>

Posted: Apr 26, 2010 08:40 AM

View 1 Replies!   View Related
Forms Data Controls :: Masked Edit Extender In Gridview - Displays Mask Not Bound Data?
I have a masked edit extender for a textbox within a grid, this textbox displays the time in format hh:mm:ss.

The grid is bound to a dataset. Now when in view mode (ItemTemplate) the label displays the time correctly but when I click edit it displays the mask instead of the bound data.

Its probally something small but is doing my nut in. (Note: I also have a mask on a date textbox and that works fine)

<asp:TemplateField HeaderText="Scan Date" SortExpression="ScanDate">
<ItemTemplate>
<div>
<asp:Label ID="Label12" runat="server"
Text='<%# Bind("ScanDate", "{0:dd/MM/yyyy}") %>'

[Code]....

Posted: Oct 21, 2009 03:44 PM

View 4 Replies!   View Related
AJAX :: MaskedEdit Extender & Validator - Save Mask Only If Value Present?
Iwant 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.

[Code]....

Posted: Sep 22, 2010 03:24 PM

View 1 Replies!   View Related
Set Time Mask And Validation Using AJAX Masked Edit?
i want to input time from user in hh:mm AM/PM format and want to use mask edit to restrict user from input. Can any one tell me what mask will i use to acomplish this.

Posted: Jul 28, 2009 01:09 PM

View 2 Replies!   View Related
AJAX :: Masked Edit Extender?
I have a textbox with a MaskedEditExtender and a MaskedEditValidator attached to it.

I would like to set the mask so that I can enter any email address which is checked by the validator.

I have the regular expression for the validator, so the only question is what would the mask look like?

basically all I need is a mask that allowes any number of characters, but if I set it to ???? then it allowes only 4 characters but I don't know up front what the length if the email address is.

Posted: Aug 10, 2010 11:00 AM

View 2 Replies!   View Related
AJAX :: Add Edit Via Modal Extender?
I am new to Ajax and want to find out if what i am about to do is correct. I want to create an aspx page that has two buttons.

One button called GetData, to connect tothe database and get table information into a grid view
the other button called Create new row, that open an input form in a modal extender to add new row into a table

My question, is that do I use the same input form for add and edit functionality or I create two forms one for Add and another for edit.

The next question, how can i call the edit input form from a grid view.

Posted: Feb 28, 2011 04:07 PM

View 2 Replies!   View Related
AJAX :: Masked Edit Extender And Validator?
I have a textbox ,and masked Edit extender and Validator Attached to it i want to validate the textbox time

Posted: Jun 04, 2010 08:13 AM

View 1 Replies!   View Related
AJAX :: No Source Available On Masked Edit Extender?
I'm using the masked edit extender in one listview control for inserting new records. When the new record is inserted, two other listview controls are displayedeach showing one record from the table it's reading from. I'm using the masked edit extender in both of these listview controls. When I try to edit the record in the first listview, there is no problem. When I try to edit the record in the second Listview, I get a no source available error. In the error info, a path is displayed that I'm not familiar with. This path does not exist on my machine, it must be built into the control:

Source File Information:

Locating source for 'd:hgactServerAjaxControlToolkitMaskedEditMaskedEditExtender.cs'. Checksum: MD5 {a1 a5 bc 1f 6e 6a 26 fe 52 f6 f6 3c 17 b2 2d 4e}
The file 'd:hgactServerAjaxControlToolkitMaskedEditMaskedEditExtender.cs' does not exist.
Looking in script documents for 'd:hgactServerAjaxControlToolkitMaskedEditMaskedEditExtender.cs'...
Looking in the projects for 'd:hgactServerAjaxControlToolkitMaskedEditMaskedEditExtender.cs'.
The file was not found in a project.
Looking in directory 'C:Program FilesMicrosoft Visual Studio 10.0VCcrtsrc'...
Looking in directory 'C:Program FilesMicrosoft Visual Studio 10.0VCatlmfcsrcmfc'...
Looking in directory 'C:Program FilesMicrosoft Visual Studio 10.0VCatlmfcsrcatl'...
Looking in directory 'C:Program FilesMicrosoft Visual Studio 10.0VCatlmfcinclude'...
Looking in directory 'C:'...
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: d:hgactServerAjaxControlToolkitMaskedEditMaskedEditExtender.cs.
The debugger could not locate the source file 'd:hgactServerAjaxControlToolkitMaskedEditMaskedEditExtender.cs'.

The two listview controls are not a master/detail view, just two records that related information.

Posted: Mar 20, 2011 08:18 PM

View 6 Replies!   View Related
AJAX :: Use Auto Tab With Masked Edit Extender?
How can I use auto-tab functionality with a masked edit extender?

I'm using a masked edit extender on a text box for inputting a date value, and I want to auto-tab to go to the next box once the date is filled in, but the autotab is always matching the javascript value since the mask is in the text box and tabs as soon as I mouse up any key in the box since the length will always match.

Posted: Apr 01, 2010 06:13 PM

View 1 Replies!   View Related
Mask Edit - Change The Property IsValidEmpty="false?
http://www.asp.net/ajax/ajaxcontroltoolkit/samples/maskededit/maskededit.aspx

I have one confusion here, please check time and enter a number format, suppose if you try to add time format and now you want save blank but after setting focus it force you to enter a time.I change the property IsValidEmpty="false" but still its not accepting blank time any one has any idea?

Posted: Sep 03, 2010 04:10 PM

View 6 Replies!   View Related
Text Box With Ajax DropDown Extender - Edit Manually
I can do DropDownList

<asp:DropDownList ID="YearList" runat="server" oninit="YearList_Init1" />

but I can't edit text manually there. I can do Text box with Ajax DropDown extender but I can't select->Insert to textbox there. Only display. how to create DropDownList which I can edit manually ?

Posted: Mar 16 10 at 5:14

View 2 Replies!   View Related
AJAX :: Masked Edit Extender Overwrites Instead Of Inserts?
I have a masked edit C99999 as a mask and allow a "C" or "D" as the beginning character.This C or D is added to an existing number when that application is Denied or Canceled.The trouble is the masked edit is in overwrite mode and destroys the original app#.Can I make it INSERT or do I need to do an append of the original number to the newprefix in the update code?I hope this isn't another RTFM question... <BLUSH>

Posted: Aug 24, 2010 04:14 PM

View 1 Replies!   View Related
AJAX :: Masked Edit Extender Error On Host?
I'm receiving thefollowing error from my hosting site:

Reference required to assembly 'System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' containing the base class 'System.Web.UI.ExtenderControl'

The bin file with the toolkit has been uploaded to my site.

I'm using Web Developer 2010 Express and built my project for a target 3.50 framework which is the framework on my hosting site. I have about 8 pages that are working fine in prod.

The control works on my local machine.

Posted: Nov 25, 2010 11:42 PM

View 8 Replies!   View Related
AJAX :: Dynamically Edit Target Control ID Of An Autocomplete Extender?
how can change target control ID of an autocomplete Extender withoutrefreshing page or using update panel

exactly with ajax!!!

andhow can add an new instance of server controls like Ajax control toolkit or Standard controls like TextBox,Button,..

Posted: May 20, 2010 12:34 PM

View 1 Replies!   View Related
Forms Data Controls :: Input Mask In Edit Mode On DetailsView Control?
Is it possible to have an input mask in the detailsview when editing a record?

Posted: Apr 18, 2010 01:29 AM

View 3 Replies!   View Related
AJAX :: Masked Edit Extender - Date 01/01/0001 Reset To 01/01/1910 On Postback
I have a masked edit extender extending a text box. I enter the date 01/01/0001 then change a selection on a drop down list inside the same update panel with the autopostback property set to true. The date is changed to 01/01/1910.

[Code]....

Posted: Jul 28, 2010 02:22 PM

View 7 Replies!   View Related
AJAX :: How To Modal Popup Extender Inside A Gridview With Edit Delete And Save Buttons
I have a gridview (gridview-a)with a link button when the user click on this link button it opens a separate modal pop up extender with another grid view (gridview-b) (working fine) I added a close button inside the panel. When the user click on it the modal pop up is getting closed. Excellent.

Now my problem is When I addEdit,Save and Update buttons to the gridview-b (i.e. Present inside Popup) when ever I click on the edit , or save or update buttons it is going to the gridview-a. How can I avoid that? Do I have to keep the gridview inside a update Panel and make the update mode conditional? If thats true how can I edit , save and delete the rows ( I need to call stored prcedures and all row-databound functions to do that)

Posted: Jul 08, 2010 03:44 PM

View 5 Replies!   View Related
AJAX :: Specify Two Types Of Mask In A MaskEditValidator ?
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 ?

Posted: Jul 12, 2010 08:06 AM

View 1 Replies!   View Related
AJAX :: Removing Mask On MaskedEdit?
I have a masked edit control

[Code]....

But on post back in my button event I don't want to see the masked in the text box ( the dollar sign ).

Is there a method I can call that will wipe the mask out? I'd rather avoid having to call RegEx to clean it.

Posted: Feb 27, 2010 07:03 PM

View 1 Replies!   View Related
AJAX :: Mask Holidays In Calendar?
I haveholiday 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 namewhen user mouse overs on date in the calendar

Posted: Jun 01, 2010 05:12 AM

View 3 Replies!   View Related
AJAX :: Clear Mask When Using MaskedEdit?
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.

[Code]....

Posted: May 20, 2010 12:37 PM

View 2 Replies!   View Related
AJAX :: MaskedEditExtender Phone Dashes In Mask
I just started using the mask control. I have it working exactly the way I want with date but can't get the same behavior with Phone.

<AjaxControlToolkit:MaskedEditExtender
ID="mskTbTicketOpenedDate"
runat="server"
TargetControlID="tbTicketOpenedDate"
Mask="99/99/9999"
MessageValidatorTip="true"
OnFocusCssClass="MaskedEditFocus"
OnInvalidCssClass="MaskedEditError"
MaskType="Date"
ErrorTooltipEnabled="True" />

Date Mask Validator:

<asp:RequiredFieldValidator
ID="rfValTbTicketOpenedDate"
runat="server"
ControlToValidate="tbTicketOpenedDate"
Display="Dynamic"
ErrorMessage="required!<br />" />
<AjaxControlToolkit:MaskedEditValidator
ID="mskValTbTicketOpenedDateInvalid"
runat="server"
ControlExtender="mskTbTicketOpenedDate"
ControlToValidate="tbTicketOpenedDate"
IsValidEmpty="false"
InvalidValueMessage="Date is invalid<br />"
Display="Dynamic" />

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:

<AjaxControlToolkit:MaskedEditExtender
ID="mskTbPhone"
runat="server"
TargetControlID="tbPhone"
Mask="999-999-9999"
ClearMaskOnLostFocus="true"
MessageValidatorTip="true"
OnFocusCssClass="MaskedEditFocus"
OnInvalidCssClass="MaskedEditError"
MaskType="None"
ErrorTooltipEnabled="True" />

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.

Posted: Feb 11, 2010 03:11 PM

View 3 Replies!   View Related
AJAX :: MaskedEditBehavior Change Mask Dynamically?
how to do for changing the mask editdynamically?

Posted: Jan 04, 2010 10:04 AM

View 1 Replies!   View Related
Applying Date Mask To A Textbox Without Using AJAX Or JQuery?
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?

Posted: Dec 04, 2010 02:20 PM

View 5 Replies!   View Related
AJAX :: MaskedEditExtender - User Escapes Mask Disappears
I have two pair ofMaskedEditExtenders andtext boxes set up as a standard form with a submit button. The form is encapsulated in an update panel with the UpdateMode=Conditional.The MaskedEditExtenders work beautifully, but when a user (code-reviewer) presses the escape key at the end of the textbox, the mask disappears. From here on, when the user submits the form, the following error is displayed:

Invalid postback or callback argument. Event validation is enabled using <pages enableEventValidation="true"/> in configuration or <%@ Page EnableEVentValidation="true" %> in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server ocntrol that originally rendered them.if the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation.

Thedata is validated on the server, soallowing users to remove the mask is okay, but have the error message is not. I've tried typical troubleshooting techniques to find where the problem lies (such as turning off partialPageRendering and/or disabling the MaskedEditExtenders). The form works fine when either of the pre-described changeswhere in effect. Has anyone experience thisissue before and have a better implmentation/work around?

Posted: Mar 26, 2007 07:29 PM

View 11 Replies!   View Related
AJAX :: Changing Mask Value For MaskedEditExtender Using Java Script
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

[Code]....

Posted: Feb 27, 2010 04:21 AM

View 2 Replies!   View Related
AJAX :: Phone Number Mask Format With MaskedEditExtender
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?

Posted: Feb 21, 2011 01:07 PM

View 2 Replies!   View Related
AJAX :: AJAX Inline Edit Box Control In GridView Displaying In Edit Mode?
I havetwo InlineEditBox.NET controls ina template field inside a GridView.When displayed in theGridView,the first row is OK, but starting with the secondrow, the controls are automatically displayedin edit modewhen the page loads, and I can't figure out why.

[Code]....

Posted: Aug 18, 2010 02:28 PM

View 1 Replies!   View Related
AJAX :: MaskedEditExtender Mask Not Working Properly After Turning Off Readonly
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'm using Ajax toolkit v3.0.30512

Posted: Sep 24, 2010 10:23 PM

View 5 Replies!   View Related
AJAX :: Html Editor Control Extender(Ajax Toolkit Control Extender) Enable Property Not Working?
I have Html Editor control extender in my application. Iam trying to set property likeEnabled="false" , but its allows to enter content in that control.Html Editor control extender Enable property not working.This ismy control Htmlcode.

<cc1: Editor ID="editor1" runat="server" Enabled="false" Width="400" Height="600"/> --- Now its allows toenter content.

When i try toset to Enabled="false" then, Font and Size dropdowns disabled, Remaining all areenabled.

<asp:TextBox ID="txtbox1" runat="server" Enabled="false" ></asp:TextBox> ---- Now its doesnot allow to enter text.

Posted: Oct 14, 2009 04:32 AM

View 6 Replies!   View Related
AJAX :: Reach The Mask Property From The MaskedEditExtender Control In The Client Side Script?
How do I reach the mask property from the MaskedEditExtender control in the client side javascript?

[Code]....

Posted: Jan 18, 2010 06:10 PM

View 4 Replies!   View Related
AJAX :: Calendar Extender Hides Behind DropDownList In ModalPopup Extender?
Ajax Calendar Extender hides behind DropDownList In ModalPopup Extender

Posted: Aug 25, 2008 10:45 AM

View 10 Replies!   View Related
DataSource Controls :: Decimal Values Not Updating With Decimal Places?
I'm trying to execute this statement every minute with SQL Agent, I haveit set up as a job:

[Code]....

It's trying to update a column which data type is set to decimal. Just so you know what I really need out of it, here is an example:

[Code]....

The answer of which should add on 0.5 to the original value. If I were to use the increase value of 60 which then becomes 60/60 it will work.I'm dividing by 60 because the increase value is per hour so I make it smaller to get per minute value. Why is it doing this?

Posted: Apr 06, 2010 07:52 PM

View 2 Replies!   View Related
C# - Doing A Math.Round(x,2) On A Decimal Value, But Need To Ensure 2 Numbers After Decimal As Its Money
Some values are returning 2.0 but I need it to be 2.00 as this is a money value that is displayed to the web page.

I am doing:

Math.Round(value, 2);

Is there a way to force it to 2 numbers after the decimal?

Posted: Mar 3 10 at 23:11

View 3 Replies!   View Related
Convert Decimal With Money Symbols To Pure Decimal?
I'm reading an excel file that has some money numbers like these:

$30,000
$25,000

Although in my db the datatype is "money" for this field, when I read it in my C# app, it is considered a decimal, so I need to cast to decimal.I'm trying to convert it to decimal with Convert.ToDecimal but it says it has not the correct format.How can I convert it to pure decimal? I'm not sure if using an overloaded method of Convert.ToDecimal with IFormatProvider can do the trick.

Posted: Jun 23, 2009 01:06 AM

View 5 Replies!   View Related
Decimal Calculation / Public Static Decimal Convertkgtolbs?
I have following code:

public static decimal Convertkgtolbs(decimal startnumber)
{
try

[code]...

Posted: Apr 29, 2009 08:14 AM

View 4 Replies!   View Related
Copyright 2005-08 www.BigResource.com, All rights reserved