p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   C# 2005 (http://p2p.wrox.com/forumdisplay.php?f=138)
-   -   'Table' does not contain a definition for 'BorderS (http://p2p.wrox.com/showthread.php?t=70561)

AccessAasif@aol.com September 12th, 2008 01:10 PM

'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;



Imar September 13th, 2008 03:08 AM

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.

All times are GMT -4. The time now is 07:23 PM.

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