468,544 Members | 1,823 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,544 developers. It's quick & easy.

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

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
1 1280
danp129
321 Expert 100+
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.

Similar topics

10 posts views Thread by Wonderinguy | last post: by
1 post views Thread by Suresh Tri | last post: by
4 posts views Thread by David Garamond | last post: by
7 posts views Thread by Jim Carlock | last post: by
4 posts views Thread by natG | last post: by
4 posts views Thread by wildman | last post: by
9 posts views Thread by s0suk3 | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by UniDue | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.