By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,867 Members | 1,981 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,867 IT Pros & Developers. It's quick & easy.

how do i check text from a text box that is in mixed case?

P: n/a
I need the following to check if the user entered the word:
(the following is a snippet of the full scritp)

Expand|Select|Wrap|Line Numbers
  1. 'Verifies repairStatus is one of valid status.
  2.         if repairStatus<>ucase("new") AND repairStatus<>ucase("repaired") AND repairStatus<>ucase("completed") then
  3.             errorString=errorString + "Invalid status.<br/>"
  4.         end if
  5.  
for example, if the user typed 'New' I would not see the error
Oct 21 '10 #1
Share this Question
Share on Google+
1 Reply


danp129
Expert 100+
P: 321
Not sure I understand you but here's how I would code it if I'm understanding what you are doing..
Expand|Select|Wrap|Line Numbers
  1.         ' set repairStats variable to UPPER CASE version of what user submitted 
  2.         '(Replace "Form" with "Querystring" if form method is GET)
  3.         repairStatus = UCase(Request.Form("status"))
  4.         If repairStatus <> "NEW" And repairStatus <> "REPAIRED" And repairStatus <> "COMPLETED" Then errorString = errorString & "Invalid status.<br/>"
  5.  
Oct 22 '10 #2

Post your reply

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