<script type="text/javascript" language="javascript">
function getfacid() {
var facid = $('#<%=ddl_facility.ClientID%>').val()
$("#<%= hdnfacid.ClientID %>").val(facid);
var hval = document.getElementById('<%=hdnfacid.ClientID %>').value;
}
</script>
<input id="hdnfacid" runat="server" type="hidden" />
<asp:DropDownList runat="server" ID="ddl_facility" Width="170px" onchange="getfacid()">
</asp:DropDownList>