Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Error: 'Table' does not contain a definition for 'BorderStyle'

Error: 'Table' does not contain a definition for 'BorderStyle'

Scheduled Pinned Locked Moved C#
helparchitecture
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    A Asif
    wrote on last edited by
    #1

    Hi All, I am trying to create a table but getting following complie 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; Thanks, A.Asif

    A.Asif

    G 1 Reply Last reply
    0
    • A A Asif

      Hi All, I am trying to create a table but getting following complie 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; Thanks, A.Asif

      A.Asif

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      The System.Web.UI.WebControls.Table class has a BorderStyle property, so that's obviously not the class that you created. Is that the class that you intended to create? Is it a WPF project? Then you use BorderBrush and BorderThickness to specify the border.

      Despite everything, the person most likely to be fooling you next is yourself.

      A 1 Reply Last reply
      0
      • G Guffa

        The System.Web.UI.WebControls.Table class has a BorderStyle property, so that's obviously not the class that you created. Is that the class that you intended to create? Is it a WPF project? Then you use BorderBrush and BorderThickness to specify the border.

        Despite everything, the person most likely to be fooling you next is yourself.

        A Offline
        A Offline
        A Asif
        wrote on last edited by
        #3

        Hi, Thanks for your help. However, I am using System.Web.UI.WebControls.Table class that has a BorderStyle property, so obviously I should NOT get this error, but for some reason I am geting this error. Also this not a WPF project. Any idea what could be wrong, I am using VS 2005. Please help if you can. Thanks

        A.Asif

        D 1 Reply Last reply
        0
        • A A Asif

          Hi, Thanks for your help. However, I am using System.Web.UI.WebControls.Table class that has a BorderStyle property, so obviously I should NOT get this error, but for some reason I am geting this error. Also this not a WPF project. Any idea what could be wrong, I am using VS 2005. Please help if you can. Thanks

          A.Asif

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          Well, since you just specified "Table" and not "System.Web.UI.WebControls.Table" explicitly, you're using a Table class from a different namespace. That's why yo're getting this message. Change the code to be specific and you won't see this error.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007, 2008

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups