Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 17th, 2005, 11:32 AM
Registered User
Join Date: May 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Dynamic ASP button generation

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 %>


Reply With Quote
  #2 (permalink)  
Old May 17th, 2005, 06:50 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41

.net issues are best posted in the .net area - This is the classic ASP area

Wind is your friend
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic generation of .Net button in a position sonaldewle General .NET 0 April 3rd, 2006 03:51 AM
Dynamic generation of asp.net server controls shashi1312 Classic ASP XML 1 August 2nd, 2005 04:52 AM
Dynamic Button Generation LouMattera BOOK: Professional C#, 2nd and 3rd Editions 2 March 4th, 2005 04:26 PM
Dynamic generation of controls in ASP.NET Maxood ASP.NET 1.0 and 1.1 Basics 2 March 8th, 2004 07:29 PM

All times are GMT -4. The time now is 10:17 AM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.