Add RequiredFieldValidator
<asp:TextBox runat="server" id="txtName" />
<asp:RequiredFieldValidator runat="server" id="reqName" controltovalidate="txtName" errormessage="Please enter your name!" />
reference:
http://asp.net-tutorials.com/validation/required-field-validator/[
^]
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.requiredfieldvalidator(v=vs.110).aspx[
^]
UPDATE 1:
add
Display="Dynamic"
and try by removing Validation Group if you have any. if you added validation group then you need to have the same validation group for the post back control.
<asp:RequiredFieldValidator ID="reqName" ControlToValidate="txtName" Display="Dynamic" ErrorMessage="Please enter your name!" runat="server"></asp:RequiredFieldValidator>
UPDATE 2:
I have to go back to your previous answer and find your code. The issue is you haven't give the ValidationGroup for the text boxes. if you using ValidationGroup you need to set it for the all the controls and validators you need to validate. do the changes and test your application, I have added sample code for one text box in below.
<asp:TextBox ID="UserName" runat="server" ValidationGroup="CreateUserWizard2"></asp:TextBox>
<asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate= "UserName" ErrorMessage="User Name is required." ToolTip="User Name is required." ValidationGroup="CreateUserWizard2" Display="Dynamic" >*</asp:RequiredFieldValidator>