Last post Aug 24, 2006 02:01 AM by Flasher
Aug 23, 2006 09:02 AM|Flasher|LINK
I'm developing a web site which sends information to the sql server. Though column's property in the sql server is set to "varchar", it accepts any type of characters (but returns only eng chars). I need to prevent inserting any characters but english ones
from, let's say a textbox, to the sql server.
I don't want to type an exception for every foreign char:
if (textbox1.text.contains("й")) ....
Is there any way to make asp.net BLOCK all chars except (list) instead of ALLOW all chars except (list) ?
Or maybe an easier way to prevent foreign chars =)
P.S. i'm coding in C# but i'll be thankful for VB answer too.
Aug 23, 2006 11:29 PM|Caddre|LINK
What you are looking for is called collation precedence, it can get tedious but most of what you need is covered in the links below. The first for SQL Server 2005 and the second for SQL Server 2000. Hope this helps.
Aug 24, 2006 02:01 AM|Flasher|LINK