eliminate these word

sumanthan

New member
Joined
Jan 29, 2013
Messages
3
Programming Experience
Beginner
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 attached

The Code is

C#:
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;
            }
        }
    }
}

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

Attachments

Top Bottom