How to apply validation to text box.

Posted by Umakant151 under C# on 8/1/2011 | Points: 10 | Views : 1487 | Status : [Member] | Replies : 2
Hi, Sir
I implement a project in that project i have taken one text box in that i take birthday date so i want to give validation to that text box.

Umakant


Responses

Posted by: SheoNarayan on: 8/1/2011 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
You need to use RequiredFieldValidator (http://www.dotnetfunda.com/tutorials/controls/requiredfieldvalidator.aspx) to make the textbox mandatory as well as CompareValidator (http://www.dotnetfunda.com/tutorials/controls/comparevalidator.aspx ) to check for the data in correct date format. Look at the type and operator properties of this control and you should be able to do it yourself.

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Umakant151, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Hmanjarawala on: 8/3/2011 [Member] Bronze | Points: 25

Up
0
Down
Hi, Umakant
Sheonarayan is right,
apart from this u can use custom validator n also fix ur date format at entry level.

Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/

Umakant151, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response