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

VB in .net programming: Case sensitive???

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:
<%@ Page Language="VB" %>
<script runat="server">

Sub Check_Value(Src As Object, Args As EventArgs)
If Color.Text <> "BLUE" Then
ErrMessage.Text = "ERROR! Please enter the correct word!"
End If
End Sub

</script>
I know C# , derived from the C family, keeps the case sensitive feature
from C, but are references inside <script> blocks case sensitive, even
tho the page language is VB , vbscript, or vb.net ?

Muench

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #1
2 5685
The programming language isn't case sensitive.

But you are doing a text comparison here and that always has been case
sensitive. It may be useful to look up the functions upper and lower. (If
Upper(Color.Text) <> "BLUE" Then)

HTH

Yves

"J. Muenchbourg" <an*******@dex.com> schreef in bericht
news:eF**************@TK2MSFTNGP12.phx.gbl...
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:
<%@ Page Language="VB" %>
<script runat="server">

Sub Check_Value(Src As Object, Args As EventArgs)
If Color.Text <> "BLUE" Then
ErrMessage.Text = "ERROR! Please enter the correct word!"
End If
End Sub

</script>
I know C# , derived from the C family, keeps the case sensitive feature
from C, but are references inside <script> blocks case sensitive, even
tho the page language is VB , vbscript, or vb.net ?

Muench

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 21 '05 #2
Hi

You're right C# is case sensitive, but VB.NET is not. You are wrong on the
definition of case sensitive. Case sensitive means that for example the
following 2 lines declare 2 variables (C#):
string myString;
string mySTRING;

In VB.NET you can't write the same:
Dim myString As String
Dim mySTRING As String

This is because VB.NET is not case sensitive, so every statement, variable,
.... can be entered in any case. BUT string values are ofcourse case
sensitive in VB.NET and C#! If you want to make case insensitive
comparisations, you can convert the string values to upper case and compare
them.

Jan

"J. Muenchbourg" <an*******@dex.com> schreef in bericht
news:eF**************@TK2MSFTNGP12.phx.gbl...
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:
<%@ Page Language="VB" %>
<script runat="server">

Sub Check_Value(Src As Object, Args As EventArgs)
If Color.Text <> "BLUE" Then
ErrMessage.Text = "ERROR! Please enter the correct word!"
End If
End Sub

</script>
I know C# , derived from the C family, keeps the case sensitive feature
from C, but are references inside <script> blocks case sensitive, even
tho the page language is VB , vbscript, or vb.net ?

Muench

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Jul 21 '05 #3

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

Similar topics

9
by: Paul Smith | last post by:
This doesn't seem like it should be *that* difficult, but after quite some time trying to figure it out, I'm still banging my head against the wall. My objective is to examine the exact...
2
by: Matthew Louden | last post by:
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. <%...
5
by: Madjid Nasiri | last post by:
Hi, I am basic in oracle. My Old programs write with Delphi and Databases: Access, Paradox, MySQL, Microsoft SQL. I write my code (SQL code) case-insensitivae, but now i need use oracle database....
25
by: PRESENT321 | last post by:
I just wanted to get some advice. I've had a few years experience in web site design and server-side programming and am fairly confident in my skills. There is a local Credit Union wanting to...
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: ...
4
by: xAvailx | last post by:
Hello: I didn't find any documentation that notes save point names are case sensitive, but I guess they are... Stored Proc to reproduce: /* START CODE SNIPPET */ If Exists (Select * From...
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...
2
by: Lucky | last post by:
Hi guys, I'm having problem with case sensitive collation of SQL Database. one my client is having case sensitive database. While developing the Data Layer i didn't consider this scenario. the...
11
by: Rafe | last post by:
Hi, I'm working within an application (making a lot of wrappers), but the application is not case sensitive. For example, Typing obj.name, obj.Name, or even object.naMe is all fine (as far as...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
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: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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...
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...

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.