473,326 Members | 2,815 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,326 software developers and data experts.

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 1382
danp129
323 Expert 256MB
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

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

Similar topics

3
by: tanas | last post by:
Is there a way to convert lower case text to upper case text in PHP? Any help would be appreciated. Thanks
10
by: Wonderinguy | last post by:
I have a table with data stored on upper case. I would like to change it proper mixed case. For example : change data from , THIS IS A TEST to This is a test or This Is A Test. Is there any easy...
46
by: James Harris | last post by:
Before I embark on a new long-term project I'd appreciate your advice on how to split up long names. I would like to keep the standards for command names the same as that for variable names....
1
by: Suresh Tri | last post by:
Hi, I was trying to overload concat operator ||(text,text) such a way that it behaves like Oracle. i.e. I want 'abc' || null to return 'abc' instead of null. I know that it is not the expected ...
4
by: David Garamond | last post by:
What is "text + text" supposed to do right now? It doesn't seem very useful to me. What about making "text + text" as an equivalent for "text || text"? Most strongly-typed programming languages do...
7
by: Jim Carlock | last post by:
Looking for suggestions on how to handle bad words that might get passed in through $_GET variables. My first thoughts included using str_replace() to strip out such content, but then one ends...
4
by: natG | last post by:
Hi; I am transferring data from MySql to db2 using my own java/jdbc program. Working out ok, except for the fact that our apps use mixed-case names for tables and columns. Although my CREATE TABLE...
4
by: wildman | last post by:
RE: Replacing Text without changing case?? This code works great, but case has to be exact. Research.Text = Research.Text.Replace(textboxSearch.Text, "<b>" + textboxSearch.Text + "</b>") ...
9
by: s0suk3 | last post by:
I'm totally new to C, so this is a question from a total newbie. I know most people write the names in C with underscores, as_in_this_name. But... is it also customary to write them in mixed case,...
11
by: suvitha | last post by:
Hi All, Can anyone of you send me a query to fetch only the name of the users who has name in mixed case (lower and upper case) . And query to fetch only name with upper case ? Thanks.
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.