我想做一个DropDownList下拉带可录入,如何设置style将TextBox和DropDownList重合在一起 
<asp:TableRow Height="40" >
        <asp:TableCell ID="TableCell11" cssClass="tb_edit_label">施工单位:</asp:TableCell>
        <asp:TableCell ID="k6" style="position:absolute;width: 191px"><asp:TextBox runat="server" ID="construct_units"  Columns="40" /></asp:TableCell>
  
         <asp:TableCell ID="TableCell12" cssClass="tb_edit_text">
          <asp:DropDownList ID="c_cpu" AutoPostBack="false" runat="server" DataSourceID="SqlDataSource1" DataTextField="dw" DataValueField="dw" style="position:absolute; width: 191px; clip: rect(0 191 30 175);background-color:#ffffff;" onChange='document.all.construct_units.value=this.options[this.selectedIndex].value'></asp:DropDownList>
          <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:waternewsConnectionString %>" SelectCommand="select mingcheng  dw from 表a"></asp:SqlDataSource>
          </asp:DropDownList>
  </asp:TableCell>
 </asp:TableRow>

解决方案 »

  1.   


    <select style="width:90px;" onchange="setResult(this)">
    <option>123</option>
    <option>123</option>
    <option>123</option>
    </select><input id="txtResult" type="text" style="width:70px;border-right:none;position: relative;
      left: -90px;" />
    <script>
          function setResult(o)
          {
              $("#txtResult").val($(o).val());
          }
    </script>
    就这样手写的。。应该有错的地方不过意思能明白吧?position: relative; 表示相对定位
      

  2.   

    <div style="position:relative">
    <input type="text" style="position:absolute;top:0;left:0"/>
    <select  style="position:absolute;top:0;left:0">
    </select>
    </div>
      

  3.   

    你也可以直接使用控件
    FineUI里面有下拉控件,自动补全控件