ASP Hosting sale!
Double disk space and transfer for FREE!
Limited time offer! Act Now!

aspdev | articles | tutorials | forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Search Box

 
Post new topic   Reply to topic    ASPdev.org Forum Index -> .NET Programming (ASP.NET, VB.NET, C#)
View previous topic :: View next topic  
Author Message
blueangell



Joined: 31 Jan 2006
Posts: 19

PostPosted: Wed Feb 22, 2006 11:01 pm    Post subject: Search Box Reply with quote

How can I add a search box to my site so users can find webpages on my site based on what they type in the search box?
Back to top
View user's profile Send private message
terri



Joined: 10 Oct 2004
Posts: 16

PostPosted: Thu Feb 23, 2006 9:49 am    Post subject: Reply with quote

Is the content of you website into a database? If it is you just need to search the database for the user entered keyword, and this will return all pages matching the keywor or phrase.
Back to top
View user's profile Send private message
twinkle



Joined: 31 Jan 2006
Posts: 79

PostPosted: Thu Feb 23, 2006 11:51 pm    Post subject: Reply with quote

Out of curiosity how is that returned in ASP? I am not familar with the database tie-ins for ASP.
_________________
I shine
Back to top
View user's profile Send private message
Steve



Joined: 28 Feb 2006
Posts: 15

PostPosted: Tue Feb 28, 2006 11:11 pm    Post subject: Reply with quote

twinkle wrote:
Out of curiosity how is that returned in ASP? I am not familar with the database tie-ins for ASP.


Its asp.net firstly.

Secondly, you'd set the search string as a variable, based on what the user enters.
This variable is checked against the content in the database.

Database connections are out of the scope of this thread though, there is alot of information on google about this.
Back to top
View user's profile Send private message
paul



Joined: 11 Oct 2004
Posts: 128

PostPosted: Wed Mar 01, 2006 8:00 am    Post subject: Reply with quote

You can check the site below listing various database connection strings:

http://www.sqlstrings.com




Paul
_________________
World Countries | Survival Skills
Back to top
View user's profile Send private message
Darth



Joined: 01 Mar 2006
Posts: 9

PostPosted: Wed Mar 01, 2006 5:54 pm    Post subject: Reply with quote

Search functions are one of the easiest queries you can do.
It's an SQL query.

Actually getting it to be accurate and provide relevant results is where the challenge lies.
Back to top
View user's profile Send private message
Steve



Joined: 28 Feb 2006
Posts: 15

PostPosted: Tue Mar 21, 2006 6:27 pm    Post subject: Reply with quote

Not really Darth. Generally a simple search database query will bring back pretty relevant results.

It all depends what sort of data you are searching though. If its just text then its easy, but anything else can cause some problems.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ASPdev.org Forum Index -> .NET Programming (ASP.NET, VB.NET, C#) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group

SQL Tutorial