Click here to Skip to main content
13,146,663 members (55,865 online)
Click here to Skip to main content
Add your own
alternative version


25 bookmarked
Posted 14 Feb 2005

TextBoxValidated - A .NET Windows Forms Control

, 14 Feb 2005
Rate this:
Please Sign up or sign in to vote.
A textbox control that will validate against any .NET datatype. Supports databinding, max, min, and null values.

Sample Image - TextBoxValidated.jpg


The TextBoxValidated control is a textbox specifically designed for Databinding and Data Type validation. It will automatically regect any attempt to invalidate the value. Supports any of the .NET datatypes. Includes min and max value properties and events for notifications. Also automatically handles/sets null values.


Use the setup file found in the source code's Installer/Release directory to install the control. Optionally restart your computer after installer completes to refresh your help file indexes.

Add the control to your toolbar.

Adding a control to the toolbox.

Drag the TextBoxValidated control from your toolbar onto your form.

The TextBoxValidated control in the toolbar.

Set the Validation properties.

Validation properties

If databinding, use SelectedValue instead of Text. Set the AcceptNulls property to false if you want to use empty strings rather than nulls.

Databinding properties.


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


About the Author

Robert R Freeman
Chief Technology Officer Kiefer Consulting
United States United States
Sacramento, CA based Senior .Net and SharePoint Solution Architect for Kiefer Consulting
B.S. in Mathematics from UCDavis
.NET Wizard - Experts-Exchange
MCSD, MCTS: MOSS 2007 Config

Some of the bigger questions:
1. What is the meaning of my life?
To satisfy the purpose of your creator(s). (Meaning must derive from purpose. Those who create you, give you meaning.)

2. Who is my creator?
Ultimately, God is your creator. God designed and created the universe and everything in it. You and others in your life can also be a part of your creation, overriding or furthering God's purpose.

3. What is God's purpose for me?
To love and be loved by your creator and others and to enjoy the life you've been given.
This can be distinguished two ways.
a. Use your built in common sense (morality/feelings)
b. Use the creator's handbook. Fortunately our creator did not abandon us. He is with us now and even lived and died as one of us. Check out his biography in "The Bible"

Note on free-will vs. predetermination:
God exists outside the constraints of time. He exists at every point in time simultaneously and knew of your birth and every decision you will/have made. But this does not mean God predetermined any of it. Pre and post are time related concepts that do not apply to God. God always has been and always will be. He determines our universe to exist, gives it the parameters of natural law, and allows us to make our own way through it (free-will). Note that these are all present tense, it would be more appropriate to use past, present, and future tense combined. God's purpose is for us to love him and one another. But a prerequisite of love is the free-will to love. So even though God wants us to love him/others, he can not ensure it. He can, however, help us if we allow him to. A miracle is God modifying natural parameters in response to human will.

You may also be interested in...


Comments and Discussions

GeneralDeploying the dll Pin
Jordan Walters30-Aug-06 12:04
memberJordan Walters30-Aug-06 12:04 
GeneralRe: Deploying the dll Pin
Robert R Freeman1-Sep-06 9:02
memberRobert R Freeman1-Sep-06 9:02 
GeneralFixed Decimal Format Pin
SSTELMAR15-Jun-06 11:05
memberSSTELMAR15-Jun-06 11:05 
QuestionNice control..but I have a question? Pin
walnutz25-Jan-06 14:42
memberwalnutz25-Jan-06 14:42 
AnswerRe: Nice control..but I have a question? Pin
Robert R Freeman25-Jan-06 15:15
memberRobert R Freeman25-Jan-06 15:15 
GeneralRe: Nice control..but I have a question? Pin
Hunter197310-Feb-06 11:01
memberHunter197310-Feb-06 11:01 
AnswerRe: Nice control..but I have a question? Pin
Robert R Freeman10-Feb-06 13:05
memberRobert R Freeman10-Feb-06 13:05 
JokeIncredible Help Pin
Asad Naeem15-Dec-05 23:11
memberAsad Naeem15-Dec-05 23:11 
GeneralThanks : Very useful ! Pin
kikos3122-Feb-05 20:41
memberkikos3122-Feb-05 20:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.170915.1 | Last Updated 14 Feb 2005
Article Copyright 2005 by Robert R Freeman
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid