Results 1 to 2 of 2

Thread: Table.Width

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2003
    Location
    Metrowest Boston
    Posts
    11

    Table.Width

    Dim tblNavigation As Table = New Table

    tblNavigation.CellPadding = 0
    tblNavigation.CellSpacing = 0
    tblNavigation.Width = 710

    The line above, "tblNavigation.Width = 710", does not work. I get a message stating,

    "Value of type 'integer' cannot be converted to 'System.Web.UI.WebControls.Unit'"

    How do you set the Width of a Table?

  2. #2
    Addicted Member
    Join Date
    Apr 2002
    Location
    California
    Posts
    160
    You must convert the number to unit that the browser can read. Part of System.Web.UI.WebControls Namespace.

    VB Code:
    1. Dim tblNavigation As Table = New Table()
    2.  
    3. tblNavigation.CellPadding = 0
    4. tblNavigation.CellSpacing = 0
    5. tblNavigation.Width = Unit.Pixel(710)
    Jason Moore

    Software Engineer, Database Architect, Web Designer

    (C#,VB/NET,ASP/NET,COLDFUSION,JAVASCRIPT,SQL)

    http://www.gatorstudios.com
    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width