|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
The nowrap Property of TD Tagswhich 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. The first is XHTML and second is HTML 4 compatible.
Cheers, Steve Goodyear On 5/20/05 20:49, in article uLaHKgbXFHA.2***@TK2MSFTNGP09.phx.gbl, "Nathan
Sokalski" <njsokal***@hotmail.com> wrote: Show quoteHide quote > I want to create TD tags with the nowrap property. I have a user control nowrap="nowrap" is better since it is compliant to modern standards like> 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. 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
How to react to an ImageButon in a DataList ?
AutoPostBack How can I use my Own control in DataGrid? Can we have more than 1 'control to validate' for a single validat Text control - password Referencing Datagrid Rows while Datagrid is Sorted TextBox.Text not getting the proper value Datalist Dynamic Template Loading Problem Detailsview empty dataset insert TableCell Text Wrapping Problem! |
|||||||||||||||||||||||