Avatar of ferguson_jerald
ferguson_jerald
 asked on

How to make the last two numbers typed into a asp:textbox decimals?

Hello Experts,

I have an asp:textbox with the following regular expression validator:

<asp:RegularExpressionValidator ID="rev_case_exp_cost_txt" runat="server" ControlToValidate="case_exp_cost_txt" Type="Integer" Operator="DataTypeCheck" ErrorMessage="Invalid Format" ValidationExpression="^\d{1,11}(?:\.\d\d)?$"></asp:RegularExpressionValidator>

Open in new window


How can I get it to automatically make the last two numbers entered as the decimals?  For example, if the user types 300, it should show 3.00 after they tab out of the field - or 50000 would be 500.00.  

I am using asp.net and c#.

Any help would be greatly appreciated.

Thanks,
J
ASP.NETC#

Avatar of undefined
Last Comment
ferguson_jerald

8/22/2022 - Mon
SOLUTION
Kyle Abrahams

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
Manoj Patil

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ferguson_jerald

ASKER
I tested both suggestions and they both worked!  Thanks for the help.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy