Connecting Tech Pros Worldwide Help | Site Map

How to validate a textbox from a centerlized Code

Newbie
 
Join Date: Sep 2008
Location: coimbatore
Posts: 26
#1: Mar 20 '09
Hi all
I am using visual basic dotnet 2008 .I am in need of validating the controls in my forms. but the validation code should not be created for each form , so how to validate the textbox from a centralized code, please any one help me.Its very urgent

Regards
Selvamariappan.c
tlhintoq's Avatar
Moderator
 
Join Date: Mar 2008
Location: Arizona, USA
Posts: 1,744
#2: Mar 20 '09

re: How to validate a textbox from a centerlized Code


I guess that depends on what is 'valid' for your situation and what you mean by "centralized code".

Do you want to validate that all of your textboxes match the pattern of an IP address? Or do you somehow expect a single piece of 'centralized code' to know that textbox1 should be alpha only because it is a first name, textbox2 can only be up to 20 characters long, and textbox54 must be a valid email address?
Newbie
 
Join Date: Mar 2009
Location: Connecticut
Posts: 1
#3: Mar 26 '09

re: How to validate a textbox from a centerlized Code


Basiclly i guess you would create one dll and install the assembly into the GAC. Then reference this assembly in all of your applications. This assembly will truly need a whole heck of alot of overloaded functions for all the different validations with their different parameters.
Reply