The nowrap Property of TD Tags

Ask a Question related to ASP.NET Building Controls, Design and Development.

  1. #1

    Default The nowrap Property of TD Tags

    I want to create TD tags with the nowrap property. I have a user control
    which sets the Wrap property of a TableCell to False when dynamically
    creating a table as follows:

    cellCurrButton.Wrap = False

    When the code is run, this creates a TD tag that looks like the following:

    <td nowrap="nowrap"></td>

    However, when I edit the properties of a TD Tag created in Design, there is
    a property called nowrap which when set to True creates a TD Tag that looks
    like the following:

    <td nowrap></td>

    I prefer the second way because it is shorter and I also believe it is the
    correct HTML. However, because the TableCell object does not have this
    property, I cannot use it when creating generated TableCells. Why are these
    two outputs so different? Thanks.
    --
    Nathan Sokalski
    [email]njsokalski@hotmail.com[/email]
    [url]http://www.nathansokalski.com/[/url]


    Nathan Sokalski Guest

  2. Similar Questions and Discussions

    1. Inspector Property: Dynamic tags
      Hi, I am working on an extension for Dreamweaver, currently on an Inspector. So what I understand is, that if you use the following tag: <!--...
    2. 'nowrap' available in flash forms?
      When using formgroup=hbox,horizontal,hdividedbox I'm still having issues with the page not forcing horizontal-ness. Instead of a dynamic scroll...
    3. .Net 2.0 : Smart tags and Readonly Collection Property
      Hi, I've built a composite control with a ReadOnly custom collection property. I can manage collection items in the property editor with a...
    4. nowrap with Image and Checkbox
      Hi eveyone - I am outputing images with checkboxes to a display page and I am having problems getting the checkbox to "stick" with the image....
    5. Using ParseChildren attribute to load child tags - VS removes tags
      I am building a poll control, nested in the tag I have child tags to setup the poll options. Everything works fine, but when I edit a property in...
  3. #2

    Default RE: The nowrap Property of TD Tags

    The first is XHTML and second is HTML 4 compatible.

    Cheers,
    Steve Goodyear
    Steve Goodyear Guest

  4. #3

    Default Re: The nowrap Property of TD Tags

    On 5/20/05 20:49, in article [email]uLaHKgbXFHA.2520@TK2MSFTNGP09.phx.gbl[/email], "Nathan
    Sokalski" <njsokalski@hotmail.com> wrote:
    > I want to create TD tags with the nowrap property. I have a user control
    > which sets the Wrap property of a TableCell to False when dynamically
    > creating a table as follows:
    >
    > cellCurrButton.Wrap = False
    >
    > When the code is run, this creates a TD tag that looks like the following:
    >
    > <td nowrap="nowrap"></td>
    >
    > However, when I edit the properties of a TD Tag created in Design, there is
    > a property called nowrap which when set to True creates a TD Tag that looks
    > like the following:
    >
    > <td nowrap></td>
    >
    > I prefer the second way because it is shorter and I also believe it is the
    > correct HTML. However, because the TableCell object does not have this
    > property, I cannot use it when creating generated TableCells. Why are these
    > two outputs so different? Thanks.
    nowrap="nowrap" is better since it is compliant to modern standards like
    XHTML. Standalone attributes are deprecated. In XHTML all attributes that
    were previously standalone must have value equal to the attribute name.

    VS 2003 is not XHTML compatible so Designer generates standalone attribute
    which is OK for HTML 4. VS 2005 Designer always generates nowrap="nowrap"
    since VS 2005 is XHTML compatible.

    What you see at runtime is HTML generated by ASP.NET runtime. ASP.NET
    controls try to generate XHTML whenever possible.

    Thanks
    Mikhail Arkhipov (Microsoft)
    -- This post is provided 'AS IS' with no warranties and confers no rights

    Mikhail Arkhipov (Microsoft) Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139