473,387 Members | 1,549 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

disallow special chracter and list of words

I am sorry I am posting this twice. I originally posted this under asp.net and then read the comment on top. My sincere aplogy. I beleive this question goes here.


Hi All,

I would like to know what's the best way to write function(global) in asp.net c# Framework 2.0 to check for textbox in a form (i have about 80 textbox on one form and I have many forms and textarea
and I have list of 90 ro 100 words and special chracter that I do not want user to enter. If they enter the item from the list of blocked word or character I want to give them error saying "this character or word in not allowed, please correct it"
The site is getting many hits already so I want to make sure it's not going to slow down a lot. I want to give the message as soon as one of the word or special character listed is found and not want to continue checking further.

e.g of block list word "abc","bbc","bbd","cbc","xbc","~","^","'". the list can change in the future.

I am new to asp.net and appreciate any help.

Thanks
newcoder
Dec 13 '09 #1
1 1829
GaryTexmo
1,501 Expert 1GB
Hopefully someone with more web experience can pop in and help you out, but I'll throw out something that might help you.

Do controls in asp.net still have events? If so, perhaps you can create a listener for the TextChanged event on a textbox. Then simply check to see if what's in the textbox is valid.
Dec 13 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Klaus Neuner | last post by:
Hello, I need a function that converts a list into a set of regexes. Like so: string_list = print string_list2regexes(string_list) This should return something like:
5
by: Roy Smith | last post by:
I've got a silly little problem that I'm solving in C++, but I got to thinking about how much easier it would be in Python. Here's the problem: You've got a list of words (actually, they're...
3
by: ATH0 | last post by:
How to search for special character { } and how to count them.. I got field called text ( undefined length ) and in this field you must define "{" as start and "}" as end of some text line. If...
10
by: barcaroller | last post by:
Can anyone tell me what the difference is between the 3rd Edition and the Special Edition of Stroustrup's "The C++ Programming Language"?
26
by: Swroteb | last post by:
Hi there, I've got a reasonably sized list of objects that I'd like to pull out all combinations of five elements from. Right now I have a way to do this that's quite slow, but manageable. I...
2
by: engwar1 | last post by:
I'm building a page for a website that will allow for anonymous users to post comments. I want to filter out words deemed offensive or obscene. I know HOW to build this feature but I'm wondering if...
1
by: yawgmoth7 | last post by:
Hello, I have a piece of code: command = raw_input("command> ") words = string.split(command, ' ') temparg = words if len(words)<= 3: temparg = words else: temparg = words funcarg =...
5
by: Joseph Barillari | last post by:
Hi python-list, I've just started using new-style classes and am a bit confused as to why I can't seem to alter methods with special names (__call__, etc.) of new-style class instances. In other...
1
by: bdparnes | last post by:
I have a project where it is necessary to copy rows (and change a few pieces of information); however some of the rows may contain special characters such as an apostrophie or quotes. I am using the...
17
by: newcoder10 | last post by:
Hi All, I would like to know what's the best way to write function(global) in asp.net c# Framework 2.0 to check for textbox in a form (i have about 80 textbox on one form and I have many forms and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.