Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 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 September 12th, 2008, 01:10 PM
Authorized User
Join Date: Feb 2007
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
Default 'Table' does not contain a definition for 'BorderS

I am trying to create a table but getting following compile time error:
Error: 'Table' does not contain a definition for 'BorderStyle'
can anyone help please.

Here are my code for review:

  Table tbl = new Table();

  tbl.BorderStyle = BorderStyle.Solid; //Error at this line
  tbl.BorderColor = Color.Black;
  tbl.CellSpacing = 0;


Old September 13th, 2008, 03:08 AM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Hi there,

It should be there.... : http://msdn.microsoft.com/en-us/libr...rderstyle.aspx

Is Table referring to the right namespace? That is, maybe you have a different namespace in scope that defines a Table as well? What if you try this:

System.Web.UI.WebControls.Table tbl = new System.Web.UI.WebControls.Table();

tbl.BorderStyle = BorderStyle.Solid;

Hope this helps,


Imar Spaanjaars
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Table definition for CreateUserWizard kutel ASP.NET 2.0 Basics 3 July 25th, 2007 09:57 AM
How to: Have no borders and stuff! Apocolypse2005 Beginning VB 6 7 May 8th, 2007 11:56 AM
table borders scud-murphy Dreamweaver (all versions) 1 June 6th, 2006 12:57 PM
format table borders through CSS amc Dreamweaver (all versions) 7 August 28th, 2004 10:19 AM
XHTML Strict Frame Borders Alexpizzoferro HTML Code Clinic 4 September 21st, 2003 11:54 AM

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