When I click on a row in my GridView, I want to go to a other page with the ID I get from the database.
In my RowCreated event I have the following line:
JohnB, Your code works very fine, i added just a little hack to avoid alternatingRowStyle ruining after mouseout.
e.Row.Attributes.Add("onmouseout", "this.style.backgroundColor=''");
Changed to:
e.Row.Attributes.Add("onmouseout", "if(" + e.Row.RowIndex + "% 2 == 0) { this.style.backgroundColor=''; } else { this.style.backgroundColor = '#E8F7EA'; }");
If there's a better way to do it, please let me know, but it's working perfect for me.
Greetings.