private void Button1_Click(object sender, System.EventArgs e)
{
HtmlInputFile file=new HtmlInputFile();
file.ID="file1";
PlaceHolder1.Controls.Add(file);
file=new HtmlInputFile();
file.ID="file2";
PlaceHolder1.Controls.Add(file);
file=new HtmlInputFile();
file.ID="file3";
PlaceHolder1.Controls.Add(file);
}

解决方案 »

  1.   

    private void Button1_Click(object sender, System.EventArgs e)
    {
    LiteralControl NewLine=new LiteralControl("<br>");
    HtmlInputFile file=new HtmlInputFile();
    file.ID="file1";
    PlaceHolder1.Controls.Add(file);
    PlaceHolder1.Controls.Add(NewLine);
    file=new HtmlInputFile();
    file.ID="file2";
    PlaceHolder1.Controls.Add(file);
    PlaceHolder1.Controls.Add(NewLine);
    file=new HtmlInputFile();
    file.ID="file3";
    PlaceHolder1.Controls.Add(file);
    }
      

  2.   

    或者,如果布局需要非常多样,那么在PlaceHolder1中装一个Table,然后把你的控件装在这Table的TD中。