473,609 Members | 2,187 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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:AutoComple teExtender ID="AutoComplet eExtender1" runat="server"
MinimumPrefixLe ngth="2" ServiceMethod=" GetCompleteList "
ServicePath="Au toComplete.asmx " TargetControlID ="tAssay"
CompletionListC ssClass="autoco mplete_completi onList "
CompletionListH ighlightedItemC ssClass="autoco mplete_Highligh ted"
CompletionListI temCssClass="au tocomplete">
</cc1:AutoComplet eExtender>
..autocomplete_ highlighted
{
white-space: nowrap !important;
}

Can Somebody help me with this
Thanks,
Rey
Jun 27 '08 #1
1 3533
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.R ows
If Not (dr("sample_num ber").ToString Is System.DBNull.V alue)
Or Len(dr("sample_ number").ToStri ng) 0 Then
Sample_Number = "'" & dr("sample_numb er").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:AutoComple teExtender ID="AutoComplet eExtender1" runat="server"
MinimumPrefixLe ngth="2" ServiceMethod=" GetCompleteList "
ServicePath="Au toComplete.asmx " TargetControlID ="tAssay"
CompletionListC ssClass="autoco mplete_completi onList "
CompletionListH ighlightedItemC ssClass="autoco mplete_Highligh ted"
CompletionListI temCssClass="au tocomplete">
</cc1:AutoComplet eExtender>
.autocomplete_h ighlighted
{
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
3353
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 is that the error msg doesn't show unit the use hits the submit button or the user enters data and moves the focus to another control so the field becomes dirty. So far so good. Now when the user goes back to that control and starts to input data...
0
1180
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 fields.
1
5192
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) However there is no such corresponding property for the TEXTBOX ASP.NET Webcontrol in ASP.NET 1.1. I know that there is a AutoComplete Property in the TEXTBOX ASP.NET WebControl in ASP.NET 2.0. Thus I can use AutoComplete.Disabled property in...
0
2526
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
2155
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 the user selection is one of the value list in AutoComplete textbox. If not, I need to display a warning message. Does anyone know how I can do this? I can do this by customValidate controls. But how. Could you please give me code as...
1
1387
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 - Description of CODE here". Textbox gets "CODE" only, not "CODE - Description of CODE here". Thank you in advance!
1
5840
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 research, i realized that you had to use webservice and so that is what i did. Here is the simple form with a textbox,scriptmanager and an Autocomplete extender <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs"...
0
1535
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 can find no examples of how "OnClientPopulating" is used, and I don't even know if that applies. Thank you.
0
5914
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
8109
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8035
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8509
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8374
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5502
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4002
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4059
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2502
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1366
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.