You could do this with javascript to filter out which charaters you accept, but if you can use Asp.net AJAX then you can add a FilteredTextBoxExtender to the textbox and only allow upper case and/or lower case letters.
To add a FilteredTextBoxExtender in Visual Studio 2008 you can do the following:
- view the page in design mode and find the textbox
- click the arrow on the right side of the textbox to open the TextBox Tasks menu and select Add Extender.
- Then select the FilteredTextBoxExtender and click OK
- Now your textbox should have a new property available in the designer. Make sure the textbox is selected and click F4 to open the properties designer.
- Find the new property in the property designer. It should be named YOURTEXTBOXNAME_FilteredTextBoxExtender. Find the FilterType property and select UppercaseLetters or LowercaseLetters.
- If you want both upper case and lower case letters you must edit the markup directly and set its value to "UppercaseLetters, LowercaseLetters"