473,382 Members | 1,784 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Okay to Exclude both Name and ID?

I'm dynamically building an HTML <table> that has a bunch of rows - each of
which presents read-only data in DIVs.

Just wondering if it's okay to omit both the Name and Id attribute of the
DIV tags in the table - or if there is some good reason why I should go to
the effort to create a unique Name or Id value for each (which would also
increase processing time and render more verbose html). Given that I have no
client- nor server-side code that references the DIVs, I might as well keep
things simpler. But my concern is that there might be some "gotcha" lurking
if I do this... perhaps some browsers wouldn't like it... Any thoughts on
this?

Thanks.
Nov 18 '05 #1
2 1159
Good question, GMan,

The ID is used to get a handle on Controls that you need to work with. The
Name attribute is for the client. So, assuming that you don't need to
manipulate your Controls on either server or client-side, you would have no
other need for these properties to be set.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
I get paid good money to
solve puzzles for a living

"Guadala Harry" <GM**@NoSpam.com> wrote in message
news:u3**************@TK2MSFTNGP14.phx.gbl...
I'm dynamically building an HTML <table> that has a bunch of rows - each of which presents read-only data in DIVs.

Just wondering if it's okay to omit both the Name and Id attribute of the
DIV tags in the table - or if there is some good reason why I should go to
the effort to create a unique Name or Id value for each (which would also
increase processing time and render more verbose html). Given that I have no client- nor server-side code that references the DIVs, I might as well keep things simpler. But my concern is that there might be some "gotcha" lurking if I do this... perhaps some browsers wouldn't like it... Any thoughts on
this?

Thanks.

Nov 18 '05 #2
div's do not support a name attribute. the id attribute is optional, but if
used should be unique and follow the w3c naming conventions (asp.net breaks
this rule).

-- bruce (sqlwork.com)
"Guadala Harry" <GM**@NoSpam.com> wrote in message
news:u3**************@TK2MSFTNGP14.phx.gbl...
I'm dynamically building an HTML <table> that has a bunch of rows - each of which presents read-only data in DIVs.

Just wondering if it's okay to omit both the Name and Id attribute of the
DIV tags in the table - or if there is some good reason why I should go to
the effort to create a unique Name or Id value for each (which would also
increase processing time and render more verbose html). Given that I have no client- nor server-side code that references the DIVs, I might as well keep things simpler. But my concern is that there might be some "gotcha" lurking if I do this... perhaps some browsers wouldn't like it... Any thoughts on
this?

Thanks.

Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: rbt | last post by:
Is there an easy way to exclude binary files (I'm working on Windows XP) from the file list returned by os.walk()? Also, when reading files and you're unsure as to whether or not they are ascii...
15
by: could ildg | last post by:
In re, the punctuation "^" can exclude a single character, but I want to exclude a whole word now. for example I have a string "hi, how are you. hello", I want to extract all the part before the...
2
by: Peter | last post by:
I have a site which uses forms authentication but I would like to exclude certain pages on the site from authentication. In other words I would like the user to be able to get to these pages...
9
by: paul.jameson | last post by:
I have a simple Access database that stores Karaoke Songlists for my local pub. From this you are able to print out the song lists they use. Up until now, any duplicate songs that appear on say,...
2
by: Arsen V. | last post by:
Hi, How to exclude the App_Data directory from Visual SourceSafe? It appears that Vs 2005 automatically adds the App_Data directory with the large binary MDF and LOG files to the Visual...
4
by: ninrulz | last post by:
I have been working on a database to perform some of the tasks that I have been doing manually in Excel. One of those tasks is to sort and exclude duplicate data. The fields are as follows ...
9
by: mjheitland | last post by:
Hello, when I use a property grid to display all properties of a control I want to exclude the control's name. (The name of my control shall not be altered) How do I exlude the name? ...
10
by: Simon Brooke | last post by:
I'm struggling to understand what 'exclude-result-prefixes' does and is for; the language of the standard http://www.zvon.org/xxl/XSLTreference/W3C/xslt.html#literal-result-element is not...
3
by: ITSimTech | last post by:
I'm trying to learn how/do two things here: 1) If the user searches for "Data" ($searchtext = "Data") the output should also include the fourth record because Field1 contains "all". 2) But the...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.