ID attribute value is case insensitive

Topics: Developer Forum, User Forum
Feb 7, 2008 at 9:52 PM
Edited Feb 7, 2008 at 9:53 PM
The value of a tag's ID attribute must be treated as case sensitive, but the GetElementById method is ignoring case and, in one instance, returning the wrong element for me. For better or for worse, I have a page having an element with id="Table1" and one with id="table1", and the code

HtmlNode table = htmlDoc.GetElementbyId("Table1");

and it's giving me the second table.
Feb 8, 2008 at 4:44 PM
Edited Feb 8, 2008 at 5:00 PM

edgrogan wrote:
The value of a tag's ID attribute must be treated as case sensitive, but the GetElementById method is ignoring case and, in one instance, returning the wrong element for me. For better or for worse, I have a page having an element with id="Table1" and one with id="table1", and the code