how to remove(trim) unwanted data..?

Posted by Shameer.Ali87 under Sql Server on 11/21/2012 | Points: 10 | Views : 2124 | Status : [Member] | Replies : 6
hi to all,

I am working on my auto complete textbox..
here everything is working fine but, only i am not able to make the trim function properly...
As you can see in the image, if i am typing anna.. it is displaying complete address.. Instead i need only the address
starting from anna..

check out the image..

any help will be appreciated...

shameer ali shaik


Responses

Posted by: Sandhyab on: 11/21/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,
<asp:TextBox ID="txt" runat="server" AutoCompleteType="BusinessStreetAddress"></asp:TextBox>

And, To know more about auto complete type .Refer this link
http://www.w3schools.com/aspnet/prop_webcontrol_textbox_autocompletetype.asp

Thanks & Regards

Shameer.Ali87, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Shameer.Ali87 on: 11/21/2012 [Member] Starter | Points: 25

Up
0
Down
here all the address, as shown in the image, is stored in a single coumn..
and i want to trim that unwanted data..

shameer ali shaik

Shameer.Ali87, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rickeybglr on: 11/21/2012 [Member] Starter | Points: 25

Up
0
Down
Hi ,
ru fetching data frm DB?? if yes thn we can solve ur problm by modifyn query in tht case plz post ur query here


Shameer.Ali87, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Shameer.Ali87 on: 11/21/2012 [Member] Starter | Points: 25

Up
0
Down
yes, i am fetching my data from db,
here's my query to get the auto complete data...

select DISTINCT address from address where address LIKE '%'+@SearchText+'%'


here i am using web service to fetch the data...

shameer ali shaik

Shameer.Ali87, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rickeybglr on: 11/21/2012 [Member] Starter | Points: 25

Up
0
Down
Hi .. Either u can use one of them ..i thnk in ur case first would probably work.

select DISTINCT address from address where address LIKE @SearchText+'%'

select DISTINCT address from address where address LIKE '%'+@SearchText

Shameer.Ali87, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Shameer.Ali87 on: 11/21/2012 [Member] Starter | Points: 25

Up
0
Down
sorry dude.. its not working..

shameer ali shaik

Shameer.Ali87, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response