• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 726
  • Last Modified:

asp.net Autosuggestbox - idiot's guide needed

I have an asp.net website which I want to redevelop.

The site includes a textbox which allows the user to enter a search string to search through a list of around 40,000 model codes for televisions, video recorders and other home appliances.
The possible models are loaded to a SQL Server database.

I would like to use an autosuggestbox for this.

I have downloaded the code from:
...but cannot find instructions for how to use the code.
I'll happily use an alternate system if it gets me a solution.

Any solutions need to be ones where I can simply download the right files to the right diirectories and write code in Dreamweaver or a text editor.

The solution I'm expecting will be:
1 Save these files to these folders,
2 put this code in the <body> of the page
3 put this code in the <script> of the page
4 modify these bits to include your connection string to the datasource and field used.

  • 4
  • 4
1 Solution

Use AjaxControlToolkit. It is really simple to implement.

BeamsonAuthor Commented:
The first things the demo shows is a Visual Studio screen.

Please see my comments on Visual Studio.
You don't provide existing code. You don't even mention if its a C#.Net or VB.Net application.

Also i fail to see why you wouldn't want to use Visual Studio. One of the free express editions are certainly better than a text editor.

Implementing a AJAX Toolkit AutoCompleteExtender is not very hard. Just read a tutorial or watch a video guide.

Good luck!
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

BeamsonAuthor Commented:
Thanks for the comments.

I develop using Dreamweaver with scripting in VB.  I hope I made it clear in the question (I tried the CAPITAL LETTERS approach!) that I do not use Visual Studio and am looking for a solution which does not require this development environment.
I've attached "existing" code as requested (or at least the code I'd base my tests around).

Whilst Visual Studio I'm sure is a fine development environment, I don't really want to have to retrain to use one of the flavours of visual studio just in order to be able to add an autocomplete field.  The small benefits it might give me wouldn't currently outweigh amount of time I'd need to get up and running with it.
If the solutions offered include me downloading/installing Visual Studio, installing the ajax toolkit, preparing the Visual Studio environment, potentially modifying existing site files, learning the ropes of how to get around in Visual Studio - all before I write a line of code, then this will be overkill for what I need.

I'm really just looking for solutions where I can drop the right code into the right place and make a few modifications to reflect my connection string and field values.

Sub DoSearch
 'connect to database, and forward to product page or advise product not found
End Sub
  <form runat="server">
   <asp:textbox id="searchbox" runat="server" />
   <asp:button text="search" onclick="DoSearch" runat="server"/>

Open in new window

I understand that if all you ever going to change in that project is the textbox that it might not be worth installing a full-fledged IDE. If not you probably wouldn't want to miss out on the features it provides such as intellisense and debugging. Up to you.

There a VB.NET tutorial out there too ready to get copied and pasted.

With 40k suggest-items you might want to set MinimumPrefixLength="" to something higher than 1.

Good Luck again.
By the way: although the article suggests the use of Visual Studio the code provided there works without it too if the machine running it has the appropriate .Net framework installed.
BeamsonAuthor Commented:
Thanks for the comments.

One day I will have to bite the bullet and get into visual studio but this won't be a trivial changeover.

I've got an installed copy of Visual Web Developer Express 2008 but its very alien to me.
I was hoping I could just download the latest AJAX controls toolkit, somehow make them available through the VWDE toolbox items and create a dummy web site with one page, dragging a "autocomplete" object on to the page.  I think a bit more know-how is required.

If there's just a few clicks needed to get this working, I'd be willnig to give it a go, but otherwise I'll be floundering with this and going nowhere slowly.
I know how hard it is to get used to new environments. This is coming from someone who refused to use IDE's alltogether for the most part of his developing career because i had the stupid thought of it being "un-manly". Ever since i switched from open source based development to .Net coding and the switch to Visual Studio that came along with it i became more and more a fan. Although there are still some major annoyances in the IDE i'd never want to work without it again. It just speeds up your development work so much.

I used the AutoComplete extender in 2 recent projects and had it up and running in 20 minutes using VS 2008. I'm developing in C# so i can't say anything about VB.
BeamsonAuthor Commented:
Its taken me a lot more than "20 minutes" but: job done!
Its not as intuitive as it looks but about 6 hours of perseverence and its magically started working (the hardest part was realising that my old vb SQL scripts work under Visual Studio only IF I remember to include the right imports directives!)  After that, the painful squigly underlines disapear and everything works.

Thanks for your help.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now