Autocomplete dropping leading zeros from results string array

Hi all,

I am using the autocomplete control to retrieve values from a DB. When i do a search on a string beginning with a 0 the 0 is dropped from the results shown on screen. I have debugged the GetCompletionList method and the returning string array definetly has the leading zero's. As far as i can tell it only happens with the 0 character. 

 Any one have any ideas?


P.S. I am using .net 2.0 with ajax extensions 1.0


12/11/2007 12:24:54 AM 17816 articles. 1 followers. Follow

4 Replies

Similar Articles

[PageSpeed] 34
Get it on Google Play
Get it on Apple App Store

Hi WhatStherush,

It is a known issue, please add the return items like this,


Here is the similar thread that you can reference to.

Best regards,




Jonathan Shen
Microsoft Online Community Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
12/14/2007 10:08:54 AM

That did it.

Cheers for the help.

12/14/2007 5:58:35 PM

 How can I get it with visual basic code?




Ricardo Chois 

Ricardo Chois
1/14/2008 9:55:58 PM

I find the answer... 


myList.Add(Chr(34) &  tabla.Rows(i)(0) & Chr(34))


Thnaks anyway.. 

Ricardo Chois
1/14/2008 10:10:40 PM

Similar Artilces:

Autocomplete dropping leading zeros and trailing zeros after a hyphen
Autocomplete Web Service Code 1    Imports System.Web2    Imports System.Web.Services3    Imports System.Web.Services.Protocols4    Imports System.Data.SqlClient5    Imports System.Data6    7    ' To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.8    <System.Web.Script.Services.ScriptService()> _9    <WebService(Namespace:="")> _10   <WebServiceBindi...

GridView & FormView dropping leading zeros from numbers set as strings
I'm storing in a SQL database a certain field (an employee number) as a varchar data type. Throughout the app (datasource, update/insert stored procedures, etc.) I'm working with it as a string. I've even ensured that it's being used as a string "behind the scenes" by watching it in SQL Profiler. Problem is, the GridView & FormView that display it always drop any leading zeros. Wierder yet, when I put the GridView in Edit mode & add a zero, it saves to the database with the zero, but the leading zero doesn't display in the GridView! Anyone kn...

Displaying Search String Results in GridView using String Array
I created a .aspx page with a search function to look for records in the database based on the keyword the user inputs into the textbox and then display the results in a gridview when the user clicks the submit button.  As of right now I have setup an SQLDataSource on the page that runs the following query:SELECT * FROM [recipe] WHERE ([keyword] LIKE '%' + @keyword + '%') I also setup an event handler for the Button1_Click event to set the SQLDataSource I created as the DataSource for the GridView and then did a Databind();protected void Button1_Click(object send...

Leading zero in a string
Hi All, I have a variable I'm reading off of the command line: my $option = shift; That variable should hold a number between 1 and 31 (yes, a day of the month) I am checking to make sure that the number does indeed lie in that range. However, I need to pass that variable to another system command which expects any "day" value less than 10 to have a leading zero, so 7th day of the month should say '07'. How can I check for that leading zero? If it's missing, I know I could easily: $option = "0".$option; But I can't seem to figur...

result as array or string
tablea ID SEQ_NO CODE 1 1 343 1 2 243 1 3 3243 1 4 NULL OR SPACE 1 5 343 1 6 NULL OR SPACE what i currently have is select id, @min_seq_no = min(seq_no), @max_seq_no = max(seq_no) from tablea where CODE > '' group by id select @iCount = @min_seq_no WHILE (@iCount <= @max_seq_no) BEGIN - do some insert based on seq_no SELECT @iCount = @iCount + 1 END ----- unfortunately this doesn't solve the purpose since the seq_no returned are 1 2 3 5 and i...

Zero-width split() match creates empty trailing strings but not empty leading strings
The perlfunc documentation spells this out clearly, and it matches what I see: $ perl -e 'for (split(//, "fob", -1)) { print "$_\n"; }' | sed -e 's/^$/<blank>/' f o b <blank> The question on my mind is why. In particular, is it a decision worth replicating to language's libraries? Thanks for any pointers. I tried to find the source for split, and I think I may have found it in pp_split in pp.c. But there's not really any reason to expect the source code to include the justification, and I couldn't find one. http:/...

Excel has dropped leading zeros
Hello all, I have a problem with code that exports data from SQL Server to Excel and removes leading zeros from the data in the spreadsheet. My code is below.  Is there a formatting option or something that I need to add to maintain these leading zeros?  I know that you need to treat the data as text but how is that done programmatically? DataSet objDs = new DataSet();             string source = UtilityClass.decode(ConfigurationManager.AppSettings["DSN"]);          ...

Array string in
Hi everyone, I had some problem with array string in I cannot assign value to string. Could anyone tell me what is the problem with code. Dim str() as string For i = 0 to count str(i) = "Some string" Next I had an error message saying "Object reference not set to an instance of an object" Thanks HenryToronto Trade show displays | Toronto Printing Solutions | Toronto Printing [VB.NET] Dim str As String() = New String(Count) Dim str() As String = New String(Count) [C#] string []str = new string[Count + 1];Picky...

How to pad string with leading zeroes
*** please ignore the post entitled 'Brian'. Its a duplicate of *** this post without a matching title Hi, I have a requirement to convert a 3-digit integer to a 3 character string padded with leading zeroes as I SELECT it from the database. Examples: ========= 1 converts to '001' 21 converts to '021' 321 converts to '321' I have played with several string functions to no avail. Any help/suggestions would be appreciated. Brian Two possible ways to get you going: select substring(convert(char(4),column + 1000),2,3) OR ...

Datareader results to string array
Good Day Everyone,  How can i build a "dynamic " string array from a datareader that it's returned from a query, i mean dynamic because the values returned from the database can change (more items or less items) Here the code i have so far:   Function GetLocationsForUser(ByVal UserAlias As String) As String() Dim ProcedureStrings As New ProcedureStrings() strSQL = ProcedureStrings.strSQL_GetLocationsForUser() GetConnection() Dim myCommand As New OleDbCommand(strSQL, oConn) myCommand.Parameters.AddWithValue(&quo...

Split a string and put results into Array...
Ok I really have forgotten how to do this. I have a string: "ABCD" and I have 4 images with the names "imgA, imgB, imgC, imgD" So sometimes the string will read "AD" or "BCD" or "A", etc...  what do i need to do get 'string [] split' to contain '{'A', 'B', 'C'}' if my string is 'ABC'? Here is what I have so far: string [] split = strTemp.Split(new Char[]{}); I would use myString.ToCharArray() to convert them in to a char[] and then work on them like that. Try this: string s...

returning the results from a querry to a String array
Hi all I am having some issues that I think I am pretty close on but I am not too sure. I have a table with only 2 records in it.  I dataset with a tableadapter that has a method with nothing more than a simple SQL statment  select username from admin  in my ASP I have a button that I create an object to the tableadapter and run the method.pRequestTableAdapters.AdminTableAdapter admin = new pRequestTableAdapters.AdminTableAdapter(); String[] admins = admin.FillByAdminName();    I would just like to fill ethe admins array with the values found in ...

Convert string to string array.
Hi, We have a string array argument in datawindow object for 'IN' sql statement. Our user enter a string in a single line edit. How to convert the string to a string array for the argument of datawindow? ex. user input : 'A', 'B', 'C' => str_arr[]={'A', 'B', 'C'} dw_1.retrieve(str_arr) Thanks in advance. Take a look at the n_cst_string object in the pfc. It has a method called of_ParseToArray that does exactly what you're looking for. It's a pretty simple task to 'port' the code ...

Dropping leading zeros in a GridView nvarchar field
I have a GridView that displays a column where the data is an "nvarchar" type.  These values are numbers, but look like this: "001", "002", "009", "010", "011". I would like to trim off the leading zeroes in the displayed GridView.  I have experimented with using a DataFormatString, but that is not working, as the values are not numbers - they are strings, essentially.  I know I could modify my database to store integers (as all of these values are in fact, numbers), but that brings up another problem.  I have &...

Web resources about - Autocomplete dropping leading zeros from results string array -

Autocomplete - Wikipedia, the free encyclopedia
Autocomplete , or word completion , is a feature provided by many web browsers , e-mail programs , search engine interfaces, source code editors ...

Autocomplete Me - EPIC FAIL Funny Videos and Epic Fail Funny Pictures
Click for more epic fails, videos, and wins. (Share this post and make someone ROFL!)

Autocomplete Data - Facebook-Entwickler
The value specified for the type parameter is the category of autocomplete data to retrieve, e.g. to retrieve locales, you can specify type=adlocale ...

OneKeyboard - colorful and fast custom autocomplete keyboard on the App Store on iTunes
Get OneKeyboard - colorful and fast custom autocomplete keyboard on the App Store. See screenshots and ratings, and read customer reviews.

Distraction of the Day: Someone Turned Google Autocomplete Into a Family Feud-Style Game
Say goodbye to productivity, because this game just took over your workday/life. Whenever you start typing a search into Google, the search engine ...

Selling kidneys to buy drones: the economy according to Google autocomplete
Autocomplete, the Google function that suggests full search questions based on a few words, has long served as a humorous (or harrowing) window ...

‘Google Feud’ combines popular game show with Google search autocomplete
Surely by now you've seen various jokes about Google's autocomplete feature, which suggests endings for your search terms based on what other ...

TweetDeck for Mac updated with username autocomplete, a new tweet composer, and more
... App Store . Check out 9to5Mac for more breaking coverage of Apps . What do you think? Discuss "TweetDeck for Mac updated with username autocomplete, ...

New Twitter Search Comes with Autocomplete and New Filters
Last Friday, Twitter announced what’s new on its search functionality: Search autocomplete and “People You Follow” search result. In addition ...

Google Autocomplete Is Letting The Terrorists Win
Be careful about what you search for on Google...

Resources last updated: 12/16/2015 4:28:08 PM