Hi,
I am developing contactus webpage which have a input field called Email. It is validated against a required field validator and regular expression validator with appropriate messages.
Required: Enter Email Regular Expression: Invalid Email
I am setting these two as given below:
<asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
<font color="#FF0000">*</font>
<asp:RequiredFieldValidator ID="rfvemail" CssClass="error_text" ControlToValidate="txtEmail"
runat="server" ErrorMessage="Enter email address."></asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="revemail" runat="server" ControlToValidate="txtEmail"
ErrorMessage="Invalid Email" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
My problem is both Enter Email and Invalid Email is occupying its own space. For Ex: If I leave email as empty space and press submit, Enter Email is displaying right next to it. If I enter invalid email(xxx), Enter Email is off but taking the space, Invalid Email message is displayed after these space taken by 'Enter Email' before.
Is there any way to remove this space??
Mahesh