<script> var SelectRowIndex=0; var SelectRowColor; function OnRowClick(rowIndex,id) { if(SelectRowIndex>0) document.getElementById("GVlist").rows(SelectRowIndex).style.backgroundColor=SelectRowColor; SelectRowIndex=rowIndex; var selectRow=document.getElementById("GVlist").rows(rowIndex); SelectRowColor=selectRow.style.backgroundColor; selectRow.style.backgroundColor="#6699ff"; var SelectId=document.getElementById("txtSelectId"); SelectId.value = id } </script>