Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have a project I want to remove decimal point from text box
eg:
-30.40 to 30 how it is possible by ASP.Net c#
Posted
Updated 14-Apr-12 4:45am
v2
Comments
Nelek 14-Apr-12 7:52am    
Dou you want to round it to the nearest int? or just truncate it lose the decimals? I mean 30.40 -> 30 but... 30.60 -> 30 or 31?
OriginalGriff 14-Apr-12 8:05am    
As Nelek says, but also when? And how?
Is this as the user enters data? So the decimal point and all data to the right is ignored?
Or is it later? If so, when?

1 solution

You can use a MaskedEdit box[^]. In that case, you can stop the user from entering a decimal point.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900