Access and Set Table Row ID

I'm using the following as a test to learn about some functionality I might want to use.
It involves getting and setting the Id of a table row.  
I'm clearly not doing it there a way to do it, and if so, how?

function Button2_onclick() {
var wrkRow=document.getElementById("Row2")
alert(wrkRow.tagName)   //  <=== This works, shows "TR"
alert(wrkRow.Id)            //  <=== This fails, shows undefined
wrk2Row = document.getElementById("Hey")   // <== blows up here, can't find an object with Id="Hey"

Actually, what I want to do is run a javascript function that will assign unique ID's to all the rows in a table (in this instance a rendered ASP.NET Gridview).   So this was just one approach that I thought I might be able to use...get the row as an object, and set its Id Property...(updating an existing Id would just be gravy)...but, these are all just newbie assumptions, so...

Any help on this would be appreciated.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Javascript is case sensitive. Try:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
To remember the correct casing for javascript properties remember this:
The property name will be lower case for single words. When multiplewords, first word is lower case and others are proper-cased. Example
Get Element By Id = (javascript) getElementById
To Lower Case = (javascript) toLowerCase()
codequestAuthor Commented:
That worked.   I appreciate youre last comment, also.   I've stumbled into case-sensitivity in javascript enough times that hopefully I'll start to remember.   I guess it's ME that needs to start being case sensitive! :0)
Thanks very much!  
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.