Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How to append (;) to a string in a autocomplete text box
- string[] result = txt_to.Text.Split(';');
- <asp:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="txt_to"
- MinimumPrefixLength="2" CompletionInterval="10" CompletionSetCount="3" EnableCaching="true"
- FirstRowSelected="true" UseContextKey="True" ServiceMethod="GetCompletionList"
- DelimiterCharacters=";" ShowOnlyCurrentWordInCompletionListItem="true" />
- function GetKeyPress(){
- if (window.event.keyCode == 13){
- document.getElementById ('txt_to').value +=";";
- }
- }
- function addSemiColumn(){
- document.getElementById ('txt_to').value +=";";
- }
- Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
- If IsPostBack Then
- txt_to.Focus()
- End If
- txt_to.Attributes.Add("OnKeyPress", "GetKeyPress()")
- End Sub
Add Comment
Please, Sign In to add comment