How to avoids search words

I am doing a simple search on Richtext box, using web form application
I created a "Search" button, TextBox and a RichtextBox
I need to eliminate these word from user typing in the search box
The words are
(the
and
of
to
that
in
he
shall
for
unto
i
his
a
they
be
is
not
him
them
it
with
all
thou
was
thy
which
my
me
but
their
said
ye
have
will
thee
from
as
are
when
this
were
out
by
you
up
there
then
had
into
on
one
her
we
s
your
also
so
an
if
at
us
no
do
now
therefore
every
these
our
or
because
after
o
may
did
what
over
who
she
any
among
thereof
neither
am
should
whom
nor
thus
yet
set
more
about
how
himself
than
other
ever
would
without
where
under
both
been
until
yea
wherefore
toward
well
only
such
very
between
above
yourselves
cannot
within
whosoever
could
about
above
the
and
of
to
that
in
he
for
unto
i
his
a
they
be
is
not
him
them
it
with
all
thou
was
thy
which
my
me
but
their
said
ye
have
thee
from
as
are
when
this
were
out
by
you
up
there
then
had
into
on
one
her
we
also
your
so
day
an
if
shalt
at
let
go
us
do
these
or
our
say
hast
o
did
what
who
any
put
am
two
should
know
whom
nor
thus
yet
done
saw
how
than
off
art
three
other
those
would
first
where
both
been
yea
wherefore
five
four
whose
being
much
why
only
such
very
though
ten
can
therein
known
while
doth
thyself
six
cannot
third
twelve
second
could
new
knew
wherein
till
here
lo
able
throughout
find
forty
fifty
thence
must
get
ask
lot
wherewith
ought
threescore
tenth
ones
plain
whereof
el)
The Code is
[code]

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace search_bar_w_richtextbox
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
int index = 0;
while (index < richTextBox1.Text.LastIndexOf(textBox1.Text))
{
richTextBox1.Find(textBox1.Text, index, richTextBox1.TextLength, RichTextBoxFinds.None);
richTextBox1.SelectionBackColor = Color.Green;
index = richTextBox1.Text.IndexOf(textBox1.Text, index) + 1;
}
}
}
}
[/code]

If any one know how to eliminate those word from user typing,
Can you post the full Code !!!!

Comments

  • Here is a good start on perhaps answering some portion of your question, I found this via @veriously I hope this helps! http:// stackoverflow.com/questions/6306465/search-box-with-database
  • Here is a good start on perhaps answering some portion of your question, I found this via @veriously I hope this helps! http:// stackoverflow.com/questions/6306465/search-box-with-database
  • I finished this project!!!,
    I did it totally different way thanks for interest an help
    Take Care
    Have a good Day!!!.
    If i have any more question I will post and waiting for your reply!!!!
  • Hi,,
    I did it different way thanks for your interest and help.
    Take Care
    Have A Nice Day
    If I have any more question I will post and waiting for your Reply.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories