I am trying to dynamically generate HTML content with
VB in ASP.NET. Everything is wonderful except for the <asp:Button> which does not appear. I have read that I need to create an object and add it to the page. Sounds great except except I haven't found an example give me a more explicit idea of what to do. Any help would be greatly appreciated, code is included below.
"I'm stupid. You're smart. I was wrong. You were right. You're the best. I'm the worst. You're very good-looking. I'm not very attractive." - Happy Gilmore
<body bottomMargin="400" leftMargin="0" topMargin="0" onload="resizeTo(document.body.scrollWidth,documen t.body.scrollHeight)"
rightMargin="0" MS_POSITIONING="GridLayout">
<%
Dim Func As Integer
Func = Request("Func")
if Func <> 2 Then
Func = 1
End if
Select Case Func
Case 1
Response.Write("<form runat='server' enctype='multipart/form-data' ID='Form1' ACTION='report.asp?func=2'>")
Response.Write("<table align='center' cellspacing='2' cellpadding='2'>")
Response.Write("<tr><td colspan='2'><H2>Report</H2></td></tr>")
Response.Write("<tr><td>Main File</td><td><input type='file' runat='server' id='namefile' NAME='namefile' /></td></tr>")
Response.Write("<tr><td>G1 File</td><td><input type='file' runat='server' id='g1file' NAME='g1file' /></td></tr>")
Response.Write("<tr><td>I File</td><td><input type='file' runat='server' id='ifile' NAME='ifile' /></td></tr>")
Response.Write("<tr><td>G2 File</td><td><input type='file' runat='server' id='g2file' NAME='g2file' /></td></tr>")
Response.Write("<tr><td colspan='2' align='center'><asp:Button ID='cmdCheck' Text='Check' runat='server' OnClick='check' /><input type=""reset"" /></td></tr></table>")
Response.Write("<asp:datagrid ID='DataGrid1' runat='server'></asp:datagrid>")
Response.Write("<asp:label ID='l1' runat='server'></asp:label></form>")
Case 2
Response.Write ("Case 2")
Case Else
Response.Write("oh no")
End Select %>
</body>