Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 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 July 13th, 2004, 10:28 AM
Registered User
 
Join Date: Jul 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Creating a table programmatically

I created a htmlcontrol a table and gave it an id and runat server attribute so I could refer to it in my code. I then created a StringBuilder and append how the table should be structured. I finally assigned my string builder to the htmlcontrol InnerHtml attribute so that the table could be dynamically created at page load. But I got an error when loading the page here is the error "The 'mode' attribute is case sensitive and must be one of the following values: On, Off, RemoteOnly." the funny thing is that when i comment out one line of code the one that assigns the InnerHtml attribute to a string the page is displayed with no errors. Could you let me know what I have done wrong?


  #2 (permalink)  
Old July 13th, 2004, 12:58 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

Could you post any relevant code?

Brian
  #3 (permalink)  
Old July 15th, 2004, 11:44 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

There is a much simpler way to go about this:

Once you have the HTML table as an object in the server code, you can add rows and cells to the table thru the use of those respective objects...

Dim myTable As HtmlTable
myTable.Rows.Add(New HtmlTableRow)
myTable.Rows(0).Cells.Add(New HtmlTableCell)

and so on...

Peter
-------------------------
Work smarter, not harder
 


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
creating multiple instances programmatically dcher BOOK: Access 2007 VBA Programmer's Reference ISBN: 978-0-470-04703-3 4 December 28th, 2007 02:21 PM
creating code programmatically mumphis Excel VBA 0 September 2nd, 2005 09:29 AM
Report - programmatically creating penta Access 12 May 19th, 2005 04:53 PM
Creating report programmatically liliarum BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 1 July 6th, 2004 09:34 AM
Creating Tables Programmatically stu9820 ASP.NET 1.0 and 1.1 Basics 10 October 22nd, 2003 04:25 PM



All times are GMT -4. The time now is 01:26 PM.


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