Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/oop/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 可搜索下拉列表_C#_Asp.net_Drop Down Menu - Fatal编程技术网

C# 可搜索下拉列表

C# 可搜索下拉列表,c#,asp.net,drop-down-menu,C#,Asp.net,Drop Down Menu,我有数据库填写的下拉列表。如何使其可搜索? 我可以解决一些问题,但当数据绑定到Notes工作中的数据库时。 我的填充方法不对吗 <asp:Label ID="lbProbType" runat="server" Text="Problem Type"" Font-Bold="True"></asp:Label> if (!IsPostBack) {

我有数据库填写的下拉列表。如何使其可搜索? 我可以解决一些问题,但当数据绑定到Notes工作中的数据库时。 我的填充方法不对吗

<asp:Label ID="lbProbType" runat="server" Text="Problem Type"" 
Font-Bold="True"></asp:Label>



if (!IsPostBack)
            {
                SqlConnection cn = new SqlConnection(@"");
                string readnamesquery = "select cwFullTitle from tbCowWorkers order by cwLName";
                cn.Open();
                SqlCommand cmd = new SqlCommand(readnamesquery, cn);
                SqlDataAdapter da = new SqlDataAdapter(cmd);
                
                DataTable dt = new DataTable();
                da.Fill(dt);
               
                dpCaller.DataSource = dt;
                dpCaller.DataTextField = "cwFullTitle";
                dpCaller.DataBind();
                cn.Close();
            }