asp.net - textbox and label position issue -
i new asp.net , facing small problem in it. problem set textbox
, label
in different position , while use <br/>
tag form looking bad how can resolve flow?
code is:
<tr> <td align="right" style="padding-right: 5px;" class="style6"> <asp:label id="lblemailid" runat="server" text="email id :"></asp:label> </td> <td align="left" style="padding-left: 5px;" class="style6"> <br/><br/><br/> <asp:textbox id="txtemailid" runat="server" width="70%" autocompletetype="office"></asp:textbox> <asp:requiredfieldvalidator id="requiredfieldvalidator1" runat="server" controltovalidate="txtemailid" errormessage="you can't leave empty." style="color: #ff0000;"></asp:requiredfieldvalidator> <asp:regularexpressionvalidator id="rfvemailid" runat="server" controltovalidate="txtemailid" errormessage="not valid email address" setfocusonerror="true" validationexpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" validationgroup="createuserwizard1" style="color: #ff0000;" /> <br /> </td> </tr> <tr> <td colspan="2"> <br /> </td> </tr> <tr> <td align="right" style="padding-right: 5px; " class="style6"> <asp:label id="lblphoneno" runat="server" text="phone no. :"></asp:label> </td> <td align="left" style="padding-left: 5px; " class="style6"> <asp:textbox id="txtphoneno" runat="server" width="70%" autocompletetype="office"></asp:textbox> <asp:requiredfieldvalidator id="requiredfieldvalidator2" runat="server" controltovalidate="txtphoneno" errormessage="you can't leave empty." style="color: #ff0000;"></asp:requiredfieldvalidator> <asp:regularexpressionvalidator id="rfvphoneno" controltovalidate="txtphoneno" validationexpression="\d{10}" errormessage="the number must 10 numeric digits!" runat="server" style="color: #ff0000;" /> </td> </tr>
plz can 1 me on flow...,
- get rid of
<br />
,
tags. set requiredfieldvalidator , regularexpressionvalidator dynamically display
<asp:requiredfieldvalidator id="requiredfieldvalidator1" runat="server" controltovalidate="txtemailid" errormessage="you can't leave empty." style="color: #ff0000;" display="dynamic"></asp:requiredfieldvalidator> <asp:regularexpressionvalidator id="rfvemailid" runat="server" controltovalidate="txtemailid" errormessage="not valid email address" setfocusonerror="true" validationexpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" validationgroup="createuserwizard1" style="color: #ff0000;" display="dynamic"/>
Comments
Post a Comment