tags:

views:

85

answers:

1

In C#, I am using the mshtml.HTMLDocument to retrieve various elements from a page.

For example:

button = (mshtml.HTMLButtonElement)theDoc.getElementById("ID1");

Now, if I am running IE6,IE7,IE8, will "ID1" change depending on browser version?

+3  A: 

No, ID is an attribute of the tag. So if you have

<input type="button" id="ID1" ... />

It's ID will be ID1 in all browsers.

Spencer Ruport