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 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:"></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>             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;             <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;" />&nbsp;<br />             &nbsp;         </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.&nbsp;&nbsp;:"></asp:label>         </td>         <td align="left" style="padding-left: 5px; " class="style6">             <asp:textbox id="txtphoneno" runat="server" width="70%" autocompletetype="office"></asp:textbox>             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;             <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...,

  1. get rid of <br /> , &nbsp; tags.
  2. 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

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -