|
 ASP.NET
WHERE-Clause WebControl
The SqlSearchTextBox Control for ASP.NET enables you to generate WHERE-Clauses
on the fly.
On this page:
What is the SqlSearchTextBox?
Tired of constructing the WHERE-Clause for a SQL Search String based on your
users input? Let SqlSearchTextBox ASP.NET Control do this for you.
This Control behaves like the standard ASP.NET TextBox Control except that it
provides additional functionality to build a WHERE-Clause based on the Text
provided. The only thing you have to do is to call the GetWHEREClause and paste
the result after your WHERE Statement of your SQL String.
How does it work?
Simply reference the WiredBOX.WebUI.SqlSearchTextBox in your VS.NET Toolbox
and drag it onto your WebForm. Then set the desired Properties in the
Properties Window and you are done. Call the GetWHEREClause method in the Click
Event of your Search Button to get the complete WHERE-Clause.
This example includes the SqlSearchTextBox. Enter some Words to seach for
(if Match AnyWord, AllWords or Exact Phrase is selected) or an Expression (if
Match Expression is selected). Define the Colums to be used in the Clause and
set the Position property to define where to search for the Words in the
given Columns. The Clause-Type definies wether to generate a WHERE-Claus
in "Like" or "MS SQL FullText" style.
Hit the "Get WHERE" button to see the generated WHERE-Clause...
How to use the Match-Property:
-
AnyWords: One column must contain one of the words:
-
Andrew Fuller will search for Andrew
OR Fuller
-
"Andrew Fuller" will search for Andrew Fuller
-
AllWords: One column must contain all of the words:
-
Andrew Fuller will search for Andrew
AND Fuller
-
Exact Phrase: One column must contain the complete text:
-
Andrew Fuller will search for Andrew
Fuller
-
Expression: Similiar to a search engine search. You can specify the Operators
"AND", "OR" and "NOT" (or "+", "|" and "-"). The Default operator is OR if no
Operator is specified before a term in the Search Phrase. If you want to use a
different Default Search Operator, set the ExpressionDefaultOperator
Property. If you want to use different Operator Names eg. for a localized
search, set the ExpressionAndOperator, ExpressionOrOperator and
ExpressionNotOperator.
Some examples (assuming OR is the DefaultOperator):
-
Andrew Fuller will search for Andrew
OR Fuller
-
Andrew -Fuller will search for Andrew
OR NOT Fuller
-
Andrew +Fuller will search for Andrew
AND Fuller
-
Andrew AND Fuller will search for Andrew
AND Fuller
-
Andrew +(Fuller Doe) will search for Andrew
AND (Fuller OR Doe)
At a glance: Features
-
Generate WHERE-Clause in "Like" or "MS SQL FullText" style
-
Specify an unlimited Number of Column Names to generate the Clause for
-
Search for AnyWord (OR), AllWords (AND) or the Exact Pharase typed
in
-
Search by Expression (!) eg. "Red -(White + Black)"
-
Set user defined Operators eg. "UND" instead of "AND" for Expression
Search
-
Search for Quoted Text supported
-
Very easy to use!
System Requirements
-
Microsoft .NET Framework 1.1
Download Trial and Documentation
You can download the trial version of SqlSearchTextBox
from our Download Page. The trial version is fully
functional except that it only works until 2006/07/31. After this date an
exeption is thrown indicating that the trial period has been expired.
The complied Documentation (.chm) is included within the Download Package.
You can also browse the
Online Documentation.
Purchase and Licensing
If you like this control please purchase full version. You can register thru
the links on the Download Page. The introduction
price for the registered version is only 29.00 Euro (approx. 35.00 USD)
per Developer and will be sent to you by mail after successful registration
within at least 48 hours. You may include SqlSearchTextBox in your own
application but NOT in commercial applications. Reselling, redistribution,
reverse engineering or building a new control on top of this control is
strictly forbidden. Please contact us if you have questions.
|