use dhtml
http://webfx.eae.net/dhtml/combobox/combobox.htm
http://webfx.eae.net/dhtml/combobox/combo_demo.htm

解决方案 »

  1.   

    here is a server control from  MetaBuilders
    http://www.metabuilders.com/Tools/ComboBox.aspx
      

  2.   

    我写了一个,不好请给意见。谢谢!#region usingusing System;
    using System.Collections;
    using System.Configuration;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.ComponentModel;using JI0.Common;
    using JI0.Web;#endregion[
    assembly:TagPrefix("JI0.Web.Controls","bigo")
    ]
    namespace JI0.Web.Controls {
    [
    DefaultProperty("Value"), 
    ToolboxData("<{0}:MyComboBox runat=server />")
    ]
    public class MyComboBox : Control, INamingContainer {
     
    ListBox listBox = new ListBox();
    RegularExpressionValidator regexVal = new RegularExpressionValidator();
    TextBox textBox = new TextBox(); ICollection dataSource = new int[] {2322,2,3};
    int width = 132;
    int maxLength = 50;
    bool required = false; string errorMessage = "请注意格式。";
    string regularExpression = @".*"; [
    Bindable(true), 
    Category("Appearance"), 
    DefaultValue(50),

    public int MaxLength {
    get{

    return maxLength;
    } set{
    maxLength = value;
    }
    } [
    Bindable(true), 
    Category("Appearance"), 
    DefaultValue(@".*"), ] 
    public string RegularExpression {
    get{
     
    return regularExpression;
    } set{
    regularExpression = value;
    }
    } [
    Bindable(true), 
    Category("Appearance"), 
    DefaultValue(false)

    public bool Required{
    get{
    return required;
    } set{
    required = value;
    }
    }

    [
    Bindable(true), 
    Category("Appearance"), 
    DefaultValue("请注意格式。"), ] 
    public ICollection DataSource {
    get{
     
    return dataSource;
    } set{
    dataSource = value;
    }
    }
    [
    Bindable(true), 
    Category("Appearance"), 
    DefaultValue("请注意格式。"), ] 
    public string ErrorMessage {
    get{
     
    return errorMessage;
    } set{
    errorMessage = value;
    }
    } [
    Bindable(true), 
    Category("Appearance"), 
    DefaultValue(""), ] 
    public string Value {
    get{

    return this.textBox.Text;
    } set{

    this.textBox.Text = value;
    }
    }
     
    [
    Bindable(true), 
    Category("Appearance"), 
    DefaultValue(50),
    Description("样式属性(宽度)width:50")

    public int Width {
    get{
     
    return width;
    } set{
    width = value;
    }
    }
     
    protected override void CreateChildControls() { Controls.Add(new LiteralControl("<div>"));
    Controls.Add(textBox);
    Controls.Add(listBox);

    textBox.ID = "txt";
    textBox.MaxLength = maxLength;
    textBox.Attributes["style"] = "width:" + width; listBox.ID = "slt";
    listBox.Attributes["style"] = "position:absolute; visibility:hidden;width:" + (width + 20);
    listBox.DataSource = dataSource;
    listBox.DataBind();
    listBox.Rows = (listBox.Items.Count > 10 ? 10 : listBox.Items.Count);
    listBox.Attributes["onBlur"] = "this.style.visibility='hidden'";
    listBox.Attributes["onChange"] = "document.all['" + textBox.UniqueID +
    "'].value = this.options[ this.options.selectedIndex ].text;"; string button = "<input  value=▼ type=button onclick=\"___MyComboBox_Click('" 
    + listBox.UniqueID + "')\">";
    Controls.AddAt(2, new LiteralControl(button)); regexVal.ErrorMessage = errorMessage;
    regexVal.ValidationExpression = regularExpression;
    regexVal.ControlToValidate = textBox.ID; if (required) { RequiredFieldValidator reqVal = new RequiredFieldValidator();
    reqVal.ErrorMessage = " **";
    reqVal.IsValid = false;
    // reqVal.ForeColor = System.Drawing.Color.Black;
    reqVal.ControlToValidate = textBox.ID;
    Controls.Add(reqVal);
    }  Controls.Add(regexVal); Controls.Add(new LiteralControl("<br>"));
    Controls.Add(listBox);
    Controls.Add(new LiteralControl("</div>")); string script = Html.TAG_START_SCRIPT + @"
    function ___MyComboBox_Click(selectId) {
    var ___MyCombox_Select = document.all[selectId];
    ___MyCombox_Select.style.visibility = 'visible';
    ___MyCombox_Select.focus();
    }" +
    Html.TAG_END_SCRIPT; if (!this.Page.IsClientScriptBlockRegistered("MyComboBox")) this.Page.RegisterClientScriptBlock("MyComboBox", script);   
    }
    }
    }
      

  3.   

    因为时间关系我用了saucer(思归, MS .NET MVP)兄的, ji0(际零) 兄的没有试,应该也是可以的,谢谢各位了。
    给分了,呵呵!