use something like this
Private Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GridView1.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
e.Row.Attributes("onMouseOver") = "this.className='RSHover'"
If e.Row.RowIndex Mod 2 = 0 Then
e.Row.Attributes("onMouseOut") = "this.className='GridRowStyle'"
Else
e.Row.Attributes("onMouseOut") = "this.className='GridAlternatingRowStyle'"
End If
End If
End Sub
where RSHover is a css class