473,320 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Autocomplete Extender: Issue with hyphen symbol on the textbox

I have a textbox and linked that with the autocomplete extender
I have created the webservice and the WebMethod and returns a ToArray to
the textbox. Everything works when I type normal string characters but there
is a glitch when I type an hyphen character the autocomplete list starts over
or breaks in other words for eg if I want to search "05-8900-09" as soon as
I type "05-" the list will show as:
-8900
-8901 (it omits 05- and the rest of the string characters)

It doesnt display the entire string, I have tried testing the Webmethod and
able to pull the entire list in xml format and also traced the WebMethod
Toarray returns the entrie string. I dont know what could be the problem.

I am pretty okay with the webmethod logic because I am able to get the
string() in the debugger its only at runtime I am not able to see the
complete list.

I am suspecting something to do with the stylesheet white-space:nowrap

here is my control

<asp:TextBox ID="tAssay" style="white-space:nowrap;"
runat="server"></asp:TextBox>
<cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server"
MinimumPrefixLength="2" ServiceMethod="GetCompleteList"
ServicePath="AutoComplete.asmx" TargetControlID="tAssay"
CompletionListCssClass="autocomplete_completionLis t "
CompletionListHighlightedItemCssClass="autocomplet e_Highlighted"
CompletionListItemCssClass="autocomplete">
</cc1:AutoCompleteExtender>
..autocomplete_highlighted
{
white-space: nowrap !important;
}

Can Somebody help me with this
Thanks,
Rey
Jun 27 '08 #1
1 3512
Figured it out! When there are numbers followed by hyphen it is better to give
them inside the '' single quotes and autocomplete will provide the full
entry during run time...it took a while for me, hope this would help somebody
:-) here is it

For Each dr In Results.Table.Rows
If Not (dr("sample_number").ToString Is System.DBNull.Value)
Or Len(dr("sample_number").ToString) 0 Then
Sample_Number = "'" & dr("sample_number").ToString & "'"
'Note the Single Quote
items.SetValue(Sample_Number, i)
i = i + 1
End If
Next

"Rey" wrote:
I have a textbox and linked that with the autocomplete extender
I have created the webservice and the WebMethod and returns a ToArray to
the textbox. Everything works when I type normal string characters but there
is a glitch when I type an hyphen character the autocomplete list starts over
or breaks in other words for eg if I want to search "05-8900-09" as soon as
I type "05-" the list will show as:
-8900
-8901 (it omits 05- and the rest of the string characters)

It doesnt display the entire string, I have tried testing the Webmethod and
able to pull the entire list in xml format and also traced the WebMethod
Toarray returns the entrie string. I dont know what could be the problem.

I am pretty okay with the webmethod logic because I am able to get the
string() in the debugger its only at runtime I am not able to see the
complete list.

I am suspecting something to do with the stylesheet white-space:nowrap

here is my control

<asp:TextBox ID="tAssay" style="white-space:nowrap;"
runat="server"></asp:TextBox>
<cc1:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server"
MinimumPrefixLength="2" ServiceMethod="GetCompleteList"
ServicePath="AutoComplete.asmx" TargetControlID="tAssay"
CompletionListCssClass="autocomplete_completionLis t "
CompletionListHighlightedItemCssClass="autocomplet e_Highlighted"
CompletionListItemCssClass="autocomplete">
</cc1:AutoCompleteExtender>
.autocomplete_highlighted
{
white-space: nowrap !important;
}

Can Somebody help me with this
Thanks,
Rey
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: moondaddy | last post by:
I have a form for entering a user's address and all fields have a required validating control associated with them and the error msg for each field displays right next to it. The normal behavior...
0
by: GMartin | last post by:
Does anyone know of a way to trigger code after an AutoComplete Extender choice is selected by a user? I would like to populate a Form and/or other fields if the user selects one of the offered...
1
by: rbg.net | last post by:
I know that there is a autocomplete property for the HTML "INPUT type=text" control which if set to OFF, disables autocomplete of the input textbox (doesn't remember previously entered values) ...
0
by: adelscott | last post by:
Hi, I'm using an autocomplete extender and I would like to retrieve the ID that goes with the label. IE: Label, ID "Mr John","CLIENT0001" "Mr Doe","CLIENT0002" etc..
1
by: =?Utf-8?B?Ym9iYnk=?= | last post by:
I’m trying to figure out how I can achieve the followings: While typing in a textbox, making a webservice call gets possible values from DB in Autocomplete textbox. I need to validate that...
1
by: Juan Romero | last post by:
Hi guys, I have an ajax autocomplete extender working fine but I would like to populate the textbox with a different value from what the user selects. For example: User selects "CODE -...
1
by: phpmel | last post by:
Hi Guys, I cant understand why my textbox is doing nothing. I want a TextBox that would search a database and give suggestions based on what the user types on every keystroke. After doing some...
0
by: JM_newsgroups | last post by:
Hello, I see how DynamicPopulate allows one to use the AJAX loading icon with CSS. Does anybody know how to do this with the AutoComplete extender? I want to provide a little user feedback. I...
0
by: Radu | last post by:
Hi. I have an autocomplete extender <style type="text/css"> .list2 { border: 1px solid DarkGray; list-style-type: none; margin: 0px; background-color: #FFF;
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.