use this
<asp:DropDownList ID="d" runat="server" AutoPostBack="false" style="display:none"
onblur="b(this)">
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
</asp:DropDownList>
<asp:TextBox ID="txt2" runat="server"
onfocus="f(this);" />
Script
<script type="text/javascript">
function b(ctr)
{
document.getElementById('<%=txt2.ClientID %>').style.display='block';
document.getElementById('<%=txt2.ClientID %>').value=ctr.value;
ctr.style.display='none';
}
function f(ctr)
{
ctr.style.display='none';
document.getElementById('<%=d.ClientID %>').style.display='block';
}
</script>