how to display text in a table dynamically?
<p>i m using asp.net..In login form i m using requiredfield validator and regularexpression validator for username.so i need to display the error message in same td for both validation.that first it need to validate required field and display the error msg in td.if that is field it need to checkfor that expression and overite the error message in same td..</p>

<p>This my html.on button click validations are working but error message are displaying in consecuent position..</p>

<pre><code>       &lt;tr&gt;
        &lt;td&gt;
            &lt;asp:Label ID="l_uname" runat="server" CssClass="label" Text="User Name" &gt;&lt;/asp:Label&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;asp:TextBox ID="t_uname" runat="server" CssClass="text" ToolTip="Enter Username"&gt;&lt;/asp:TextBox&gt;
        &lt;/td&gt;           
        &lt;td&gt;
        &lt;label class="l" runat="server"&gt;*&lt;/label&gt;
        &lt;/td&gt;
        &lt;td&gt;
        &lt;asp:RequiredFieldValidator ID="rf_uname" CssClass="t" runat="server"           ErrorMessage="Enter the username" 
          ControlToValidate="t_uname"    ValidationGroup="logingroup"&gt;&lt;/asp:RequiredFieldValidator&gt;
         &lt;asp:RegularExpressionValidator ID="Re_name" runat="server"
            CssClass="t"  ControlToValidate="t_name" ValidationGroup="logingroup" 
            ValidationExpression="^[A-Za-z ]{6,20}$" ErrorMessage="Name should be 6-20 character"&gt;
            &lt;/asp:RegularExpressionValidator&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
    &lt;asp:Button ID="login" runat="server" Text="Login" ValidationGroup="logingroup"     onclick="login_Click"/&gt;
</code></pre>
