Pages

Subscribe:

Thursday, 4 October 2012

Required Field Validator code

if you want that any textbox control can not  be empty, then we use  the Required Field Validator Control


for ex:
you want that User Name Can not be empty.... then write that code for this...


UserName
<asp:textbox id="txtusername" runat="server"></asp:textbox>
<asp:requiredfieldvalidator  id="rqdrusername" runat="server" ContolToValidate="txtusername" ErrorMessage="Enter the UserName"></asp:requiredfieldvalidator >

0 comments:

Post a Comment