473,378 Members | 1,498 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,378 software developers and data experts.

control value must be case sensitive?

I am using VBScript for ASP. The control value must be case sensitive? The
following example should print the "fname" value, but if if I change
"submit" back to "SUBMIT". Then it works fine.

<%
If (Request.QueryString("submit") = "submit") Then
Response.Write(Request.QueryString("fname"))
End if
%>

<form action="formtest.asp" method="get">
<P><input type="text" name="fname">
<P><input type="submit" name="submit" value="SUBMIT">
</form>

Please advise! Thanks!
Jul 19 '05 #1
2 2313
IN VB Script control names are not case sensitive;
however, in string comparisons VB script IS case
sensitive. The problem is not with your control name. It
is with the fact that the string comparison is comparing
the contents of Request.QueryString("submit") which
is "SUBMIT" with a string which has a value of "submit".
They are not the same.

String comparisons in VB are always case sensitive.

HTH,
John
-----Original Message-----
I am using VBScript for ASP. The control value must be case sensitive? Thefollowing example should print the "fname" value, but if if I change"submit" back to "SUBMIT". Then it works fine.

<%
If (Request.QueryString("submit") = "submit") Then
Response.Write(Request.QueryString("fname"))
End if
%>

<form action="formtest.asp" method="get">
<P><input type="text" name="fname">
<P><input type="submit" name="submit" value="SUBMIT">
</form>

Please advise! Thanks!
.

Jul 19 '05 #2
Yes, equality of strings is case sensitive. You can use lcase or ucase on
both sides of the equation to make sure it is not case sensitive...

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"Matthew Louden" <ma*******@hotmail.com> wrote in message
news:ev**************@tk2msftngp13.phx.gbl...
I am using VBScript for ASP. The control value must be case sensitive? The
following example should print the "fname" value, but if if I change
"submit" back to "SUBMIT". Then it works fine.

<%
If (Request.QueryString("submit") = "submit") Then
Response.Write(Request.QueryString("fname"))
End if
%>

<form action="formtest.asp" method="get">
<P><input type="text" name="fname">
<P><input type="submit" name="submit" value="SUBMIT">
</form>

Please advise! Thanks!

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

32
by: Elliot Temple | last post by:
Hi I have two questions. Could someone explain to me why Python is case sensitive? I find that annoying. Also, why aren't there multiline comments? Would adding them cause a problem of some...
6
by: Boyd Reilly | last post by:
I have a form that has the user pick the type of question he will answer. The input field will be a text, numeric or date type. So, after the question is answered, I need to change the input...
2
by: J. Muenchbourg | last post by:
I'm doing a few tests with simple .net scripts, and I noticed that I display the following error message at ErrMessage.Text if I don't enter "BLUE" in capital letters into my input textbox: ...
18
by: Carramba | last post by:
Hi! I am wondering what is the best way to control that compiler manage variable names longer then 8 signs. Does it enought to set 2 variables with the same name and difference after 8 sign and...
5
by: pmud | last post by:
Hi, I am using a compare validator in asp.net application(c# code). This is used for comparing a value enterd by the user against the primary key in the SQL database. IF the VALUE ENTERED BY THE...
7
by: Chuck Hartman | last post by:
I have a Windows service that requests web pages from a site using an HttpWebRequest object. When I try to request a page from an ASP.NET 2 site, I get a WebException with message "The remote...
38
by: Bart | last post by:
Why is C case sensitive? I know it's a bit late to change it now but there would seem to be far more advantages in ignoring letter case in source code. In real life such a situation would be...
15
by: Dave | last post by:
I am getting the error above intermittantly with an ASP 3.0 page using an MS Access 2003 database. I have searched Google extensively and found the following possible causes for this error: A...
4
by: zacks | last post by:
I'm not sure when it came into being, since this it the first time I have worked very much with a password control in .NET, but if a textbox that has a non-empty value for PasswordChar or the...
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...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.