开发者

how to separate more than 1 value in a text box with a semicolon in asp.net autocomplete textbox

开发者 https://www.devze.com 2023-04-13 08:20 出处:网络
I have a text box with auto complete extender and it works fine. How can I allow the user to enter more than 1 valueby separting the first value with a semicolon(;)

I have a text box with auto complete extender and it works fine. How can I allow the user to enter more than 1 value by separting the first value with a semicolon(;)

<asp:TextBox ID="txt_to" runat="server" />

 <asp:AutoCompleteExtender ID="AutoC开发者_运维知识库ompleteExtender1" runat="server" TargetControlID="txt_to"
 MinimumPrefixLength="2" CompletionInterval="10" EnableCaching="true" FirstRowSelected="true" CompletionSetCount="3" UseContextKey="True" ServiceMethod="GetCompletionList" />


As explained in the demo page here, you should use the DelimiterCharacters property:

<asp:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server"
    TargetControlID="txt_to" MinimumPrefixLength="2" CompletionInterval="10"
    EnableCaching="true" FirstRowSelected="true" CompletionSetCount="3"
    UseContextKey="True" ServiceMethod="GetCompletionList"
    DelimiterCharacters=";" />
0

精彩评论

暂无评论...
验证码 换一张
取 消