動態產生控制項(TextBox)
Public Sub Textbox(ByVal Items As Integer)
Dim TexBox As New TextBox
TexBox.ID = "TB" & Items
TexBox.Width = 450
TexBox.Height = 15
PlaceHolder1.Controls.Add(New LiteralControl(" <table border=1 width=100%>"))
PlaceHolder1.Controls.Add(New LiteralControl(" <td width=10%>"))
PlaceHolder1.Controls.Add(New LiteralControl("題目" & Items))
PlaceHolder1.Controls.Add(New LiteralControl(" </td>"))
PlaceHolder1.Controls.Add(New LiteralControl(" <td width=60%>"))
PlaceHolder1.Controls.Add(TexBox)
PlaceHolder1.Controls.Add(New LiteralControl(" </td>"))
End Sub
Dim TexBox As New TextBox
TexBox.ID = "TB" & Items
TexBox.Width = 450
TexBox.Height = 15
PlaceHolder1.Controls.Add(New LiteralControl(" <table border=1 width=100%>"))
PlaceHolder1.Controls.Add(New LiteralControl(" <td width=10%>"))
PlaceHolder1.Controls.Add(New LiteralControl("題目" & Items))
PlaceHolder1.Controls.Add(New LiteralControl(" </td>"))
PlaceHolder1.Controls.Add(New LiteralControl(" <td width=60%>"))
PlaceHolder1.Controls.Add(TexBox)
PlaceHolder1.Controls.Add(New LiteralControl(" </td>"))
End Sub
標籤: VB.NET
0 個意見:
張貼留言
訂閱 張貼留言 [Atom]
<< 首頁