在循环中添加换行符

时间:2011-03-10 15:23:15

标签: asp.net

我使用以下代码在我的页面上添加smoe fileupload控件。我希望每一个之间都有一个换行符,但是我无法让它工作。

For i As Integer = 1 To 2
        Dim fileupload As FileUpload = New FileUpload
        fileupload.ID = "FileUp" & i
        placeUpload.Controls.Add(fileupload)
    Next

由于

1 个答案:

答案 0 :(得分:0)

For i As Integer = 1 To 2
    Dim fileupload As FileUpload = New FileUpload
    fileupload.ID = "FileUp" & i
    placeUpload.Controls.Add(fileupload)
    placeUpload.Controls.Add( new LiteralControl("<br />") )
Next