Wrox Programmer Forums
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old July 13th, 2004, 10:28 AM
Registered User
Join Date: Jul 2004
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?

Old July 13th, 2004, 12:58 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts


Could you post any relevant code?

Old July 15th, 2004, 11:44 AM
planoie's Avatar
Friend of Wrox
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts

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

Work smarter, not harder

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

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