Define RequiredFieldValidator?

RequiredFieldValidator is to make an input control a required field . The input control fails validation if the value it contains does not change from its initial value when validation is performed. This prevents the user from leaving the associated input control unchanged . RequiredFieldValidator is generally tied to a text box to force input into the text box. By default, the initial value is an empty string (""), which indicates that a value must be entered in the input control for it to pass validation . synatx
< asp:RequiredFieldValidator ID="reqName" runat="server" ControlToValidate ="txtName" ErrorMessage="You have to enter name!!" > < /asp:RequiredFieldValidator >
If your browser supports JavaScript , which most modern browsers do, then you will notice that the page is not being posted back to the server - the validation is performed clientside. Multiple validators can be associated with the same input control .