+4  A: 

I think you're over-thinking it. The simple answer is, they're not the same, so don't give them the same ID. If they share similarities, that's what classes are for. If one input is for a newsletter sign up, call it NewsletterEmail. If another is for a user sign in form, call it UserEmail. Using more descriptive IDs is good HTML and not even remotely close to the mess Webforms creates.

John Sheehan
im already in the process of renaming like that until i don't have any duplicate ids left ) curious what 'complex' ideas people are going to come up with ) better exmple : i have an 'address control' with Address1, City etc. and I want two of those controls on the page but i want them to bind
Simon_Weaver
i'm DELIBERATELY trying to over-think first, have fewer problems later. theres a little devils advocate playing in there too : http://i57.photobucket.com/albums/g212/nicoleavila75/devils_advocate.jpg
Simon_Weaver
are they in a databound list of items? if so, just append the ID of the item. e.g. Address1_123, City_123, etc
John Sheehan
If you overcomplicate early on, you're going to have more problems later than just keeping it simple.
John Sheehan
i also wanted to raise awareness of the problem becuause its important to understand the problem. in fact even if you DO understand the problem you're going to mess up sometime by mistake - hence the jQuery dupe detector function. but yes definitely shouldn't be 'afraid' of over descriptive names
Simon_Weaver
i never said i wanted to overcomplicate - i just want to overthink it. its fun to think through all this stuff. learning a lot although i wish i wasnt having to do it at such an accelerated pace
Simon_Weaver
+1  A: 

As far as form fields go, I think you are confusing the id attribute with the name attribute.

The jQuery you referred to would work well for form fields (tweaked slightly):

$('#contactUsForm input[name="Email"]')
Brannon
Yeah, that's a very important distinction to make.
John Sheehan
thanks brannon - see now why i made a point of saying i hadn't tested it :-) i forgot for a second that you automatically get the ability to search by ID or name for the same field. this strategy MAY be part of the 'over complicated' solution. i just dont know enough about binding to write one
Simon_Weaver
Yeah, the id attribute isn't really necessary for form fields. In the past it was easier to give a field an id, but with jQuery you might as well just lookup by name :)
Brannon