This resource contains the Custom TextBox Controls which can be easily integrated with your application. This will definitely help when there are situations of restricting characters and using only numbers, currency values or percentage.There is no need of validations as the control will not allow you to type the characters. Find Custom TextBox control in .NET
Learn something about Custom TextBox control in .NET
Many of us have faced difficulty in defining the validation for restricting the characters in a textbox and allow only numbers. Here I have created a dll to solve your problems.
Also when using currency you would have provided your custom coding to control. I have created custom textboxes to solve the problems and easily integrate the custom textbox in your application. The dll i have created contains the following textboxes
All three textboxes allows only numbers. For currency textbox the currency value will be prefixed with currency symbol based on the Culture set in globalisation.For percentage textbox the value will be displayed as %. How to install the controls in Visual Studio?
Now in toolbox create a new tab called CustomTextBoxes
Right click the tab and click choose items
Now a pop will open and ask you to choose the items
In that click browse button and choose the dll you downloaded
now in filter type CustomTextBoxes
Click ok to include the controls in your VisualStudio
How to use the controls in your application?
Right click on your application and choose add reference
Include the dll in your application as reference
Now you can drag the CustomTextBox and use in your application
In your CustomTextboxes you have following properties for each
MinimumAmount- Minimum value to be allowed
MaximumAmount-Maximum value to be allowed
Amount- textbox valueNote:Donot leave the amount empty. It will throw error. You must specify a value if you use Amount property.
NegativeColor- Color when the value is negative
PositiveColor- Color when the value is positive
Precision-The number of decimal places that the formatted amount will display.
Alignment: Sets the alignment of text in the control
In the ASP.NET Web Application project Web.Config file, modify the globalization section to set a specific culture (e.g., culture="en-IN" (for english-India) etc.). Note that you must use a specific culture, not a neutral culture.