Dynamically creation of Htmltable
<p>here is my code.</p>

<pre><code>    public void textFields(String TextField, String TextValue, Boolean NewLine, 
    String FieldId,  TextBoxMode txtmode, Boolean value)
    {
        HtmlTable tbldynamic = new HtmlTable();
        //tbldynamic.Width = "50%";
        HtmlTableRow tr = new HtmlTableRow();

        HtmlTableCell tclbl = new HtmlTableCell();
        HtmlTableCell tctxt = new HtmlTableCell();
        HtmlTableCell tclbl1 = new HtmlTableCell();
        HtmlTableCell tctxt1 = new HtmlTableCell();
        if (NewLine == false)
        {
            Label lblNew = new Label();
            TextBox TxtNew = new TextBox();
            lblNew.ID = "lbl" + FieldId;
            TxtNew.ID = "txt" + FieldId;
            lblNew.Text = TextField;
            TxtNew.Text = TextValue;
            TxtNew.TextMode = txtmode;
            TxtNew.Enabled = value;

            tclbl.Controls.Add(lblNew);
            tclbl.Align = "right";

            tctxt.Controls.Add(TxtNew);
            tctxt.Align = "left";

            tr.Cells.Add(tclbl);
            tr.Cells.Add(tctxt);

            tbldynamic.Rows.Add(tr);
            PanelText.Controls.Add(tbldynamic);
        }
        else if (NewLine == true)
        {

        }
    }
</code></pre>

<p>I am Passing the arguments like this.   </p>

<pre><code>tf1 = (Text_Fields)form1.FindControl("MyPanel2");
tf1.textFields("User Name ::", "Sai", false, "uid", TextBoxMode.SingleLine, false);
</code></pre>

<p>My requirement is to when ever i pass the NewLine = true it should be coming in the same "tr" if i pass NewLine =false then it should be in the next "tr"</p>

<p>an any one tell me how to do so.</p>

<p>Is any other way to process it?</p>
