Need detail about dropdownlist auto postback
Dear FriendsIn my web based project i have one and i place one drop down and one text box. i was fill the drop down list with database value, now i want to get the drop down list value into textbox.
here i try with below code
<script type="text/javascript">
function GetMasterDetails() {
var value = document.getElementById('<%=ddlContractorGrade.ClientID%>');
var getvalue = value.options[value.selectedIndex].value;
var gettext = value.options[value.selectedIndex].text;
// alert("value:-" + " " + getvalue + " " + "Text:-" + " " + gettext);
document.getElementById('<%=txtTin0.ClientID%>').value = getvalue;
}
</script>
-----------------------------------------
my problem when i select the value in drop down list then
i was press the tab control, now i got the value in textbox, but the dropdown automatically postback to the drop down 0 index value.
Ex: i have 1 to 10 no in drop down. now i select 9 then press tab for move to the next control, when i was press the control that drop down get automatically postback.
can any one guide friends