如何键入阿贾克斯组合框的文本 [英] how can type text in the ajax combo box

查看:103
本文介绍了如何键入阿贾克斯组合框的文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我添加了Ajax组合框到我的网页,但我有2个问题。

i added ajax combo box to my page, but i have 2 problems.

1,我不能在这种类型的。

1- i can not type in that.

2 - 当我在那个类型,自动寻找匹配的单词。
例如,当我键入J,发现杰克。

2- when i type in that , it automatically find matched words. for example when i type "j" , it finds "jack".

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs"  Inherits="_Default" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
    </head>
   <body>
<form id="form1" runat="server">
<div>

    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"></asp:ToolkitScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>

    <asp:ComboBox ID="ComboBox1" runat="server" AutoCompleteMode="SuggestAppend" 
            DropDownStyle="DropDownList" 

              style="display: inline;">
        <asp:ListItem>masoud</asp:ListItem>
        <asp:ListItem>jack</asp:ListItem>
    </asp:ComboBox>

    </ContentTemplate>
</asp:UpdatePanel>
</div>
</form>


推荐答案

作为@CallumHolden说..如果你将设置DropDownStyle属性于下拉,而不是DROPDOWNLIST它会工作。这个解决我的问题也是如此。

as @CallumHolden said.. if you will set the dropdownstyle property to dropdown rather than dropdownlist it will work. this solved my problem as well.

这篇关于如何键入阿贾克斯组合框的文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆