Replace() And Case Sensitivity

I am using the following replace() function:Code:

temp = Replace(temp,arr(i), "<a class=""definition"" title=""" & arr(i) & """ href=""digital-signage-glossary-of-terms.asp?modes=3&col=keywords&term=" & arr(i) & """>" & arr(i) & "</a>",1,-1,1)

The problem is that it does not appear to be case insensitive (even though I specified the "textual" argument as seen above.) For example, if "BPS" is a term in the array, but "bps" is in the "temp" variable, it will not get replaced.

View Replies


ADVERTISEMENT

Case Sensitivity

i am working on a login page in asp classic with microsoft access at the back, in current scenerio the username and passwords are not case sensitive and i have to make them C.Sensitive. can any one help me in this regard?

View Replies View Related

Retrieve HTTP_HOST With Case-sensitivity

My objective is to examine the exact case-sensitive domain used by the client to request a page, such as http://www.mysite.com vs. http://www.MySite.com. As I spin through all the ServerVariables and various & sundry HTTP headers (e.g. ALL_HTTP, ALL_RAW,
etc.), all I seem to pick up is the domain name as it's understood by the server itself - all lowercase. In principle, I just want to redirect requests made to, e.g. "themaples.com" to "TheMaples.com" for readability purposes.

I have access to ASP & ASPX on the server-side if it makes any difference. PHP & Perl/cgi are also present, but I don't code in them at all & would need much more hand holding to implement such a workaround. Plain vanilla ASP is preferred by far if possible.

View Replies View Related

Replace() Case

Is replace case sensitive?

View Replies View Related

Case Sensitive In Replace Function In ASP

I use a replace char function to remove any bad words from user's input to prevent SQL injection. Here is what I use:

Function killChars(strWords)
Dim badChars, newChars
badChars = Array("bad words here")
newChars = strwords
For i=0 to uBound(badChars)
newChars = replace(newChars, badChars(i), "")
next
killChars=newChars
End function

Now the problem is if a user enter "DeLETe" in the input box, and this word is not get removed before entering the DB. because I entered "delete" in the badchars array.

so how can I enable a case sensitive in my function? So the bad words would get deleted regardless its in upper or lower case?

View Replies View Related

Upper Case Issue In Replace Function

I just realized that when I do a replace:

replace(rs("IMAGE"),".jpg","")

it replaces all instances of a lower case .jpg but not the upper case
..JPG

How can I fix this?

View Replies View Related

Dim Inside Select Case Executes In Any Case?

Code like this
=======================
Select case q
Case "a"
Dim arr(5)
Case "b"
Dim arr(2)
end select
=====================
returns an error saying variable arr redefined.
Should it be like that or an I using Select incorrectly? Perhaps something
similar to break needs to be used?

View Replies View Related

Upper Case And Lower Case

I need to filter the records of a table where the records contain a searchin string with no case sensitive compare, and all with one only sql statement.

"SELECT * FROM Stuff WHERE LOWER(StuffName) LIKE '%" & lcase(StrSearch) & "%'"

but the error is in the function LOWER exist a similar function ?

View Replies View Related

Replace Function Not Replacing What I Tell It To Replace

If I replace "a" with "b", and then I replace "b" with "a", shouldn't I get the same result? That is what I am trying to encode and decode with Replace() function, but it is giving me different things when I replace and replace again. Here is what I am talking about: Code:

View Replies View Related

Case ASP

I have this below. If there are 0 records, I want to do nothing, which it
does. I need to perform a task if there is more than one. Case > 1 doesn't
work. The most records I would have are 5.

mycount=rs.recordcount

Select Case mycount

Case 0

Response.write ("No Records")

Case 1

View Replies View Related

Case Sensitive

i have this on my signup page
Set rs = Conn.Execute("SELECT * from rounds")

DO WHILE NOT rs.EOF

IF request.form("username") = rs.fields.item("username").value THEN

response.redirect("register2.asp")

END IF

rs.MoveNext
LOOP

the problem is.. some who signed up as say Jeff can still sign up as jeff
or jeFF how can i fix this??

View Replies View Related

Case-sensitive

My problem is like this:

http://www.4guysfromrolla.com/webte...q022400-1.shtml

But I use ASP + Access (Jet SQL 4)

View Replies View Related

How To Use Select Case

I was trying to colorize my Events from my eventtable.
Past = Grey
Today = Yellow
Future = Blue

Now my question:

How can i specify a statement not when its EQUAL to a number but greater or less than zero for example

I tried this thing and some else but it didn't really work...

color="#6464ce"
Case Else
color="black"
End Select

Probably its a simple solution and don't see the forest because there are so many trees

View Replies View Related

SELECT CASE In ASP?

I am having a hard time understanding how to use a SELECT CASE in ASP. I
have used it in VB but never in ASP scripting.

Scenerio:

I have 2 textboxes on a form that I have to allow entry to one or the other
or Both at the same time. Now I tried to use an If ElseIf but it got too
hard to track, so now I am using a SELECT CASE Statement.

TEXBOX1 named strEnglish
TEXBOX2 named strFrench

My code:
<%
strEnglish=Request.Form("strEnglish")
strFrench=Request.Form("strFrench")

Select Case

Then I have no idea how to go from here, because I have 2 input textboxes to
follow. Code:

View Replies View Related

Case Problem

i have a name in the variable like this

std="bill stevens"

I want to display it like this

Bill Stevens

i want to make the first letter as capital

here is my code

std=Request.form("stname")

stdnamedisplay=Ucase(Mid(std,1,1)) & Mid(std,2)

its not working it still displays as bill stevens

View Replies View Related

Case Statement

I am getting a syntax error on

Select Case Now
Case > "2/2/2004 12:30:00 AM"
response.redirect "votingover.asp"
case else
m=0
End Select

View Replies View Related

Select Case Between Value

"Stock Value" Could be anything from 0 to a million or so, and might include a decimal (12345.67) . I can't find how to do this:

Select Case StockValue
Case 0 To 30000
response.Write("Less than 30000")
Case 30000 To 80000
response.Write("30000 to 80000")
Case 80000 To 180000
response.Write("80000 to 180000")
Case Else ' > 180000
response.Write("Greater than 180000")
End Select

I also tried Case > 0 And <30000 .... and so on

how to write this select script please?

View Replies View Related

Case Statmemt

I have one very simple question. I an just going blank on this. I writing a select case statment and want to know if I can have one of the case equile 2 values.

IE :

select case animal
case "dog" or "cat" /// this only works if i remove the or half
'write form here
case "mouse"
'do something
end select

View Replies View Related

Case Change

right now i am developing a web site. i want to know how to write the code to change the case for the text which we entered in the text box control? for example: if user enter his name as john elan, then we should automatically convert that text into proper case. i mean the name should become John Elan.

View Replies View Related

Case Statement Redirect With Pop

I'm trying to build a case statement that when a person logs in, the login page sends them to a redirect script based on the query string redirect.asp?id=1.

So far i can make myself a basic case statement, but i'm confused on how to get the window to pop up in a 400 x 600 window with no tool bars and such. any ideas?

View Replies View Related

Not A Case Sensitive Search?

Below is my sql search code in my asp page. But my search seems to be case sensitive. How can i modify it to make it not case sensitive?

<%
sqlString = "SELECT product_image, product_name, product_description, product_price " &_
"FROM Products " &_
"WHERE product_status = 1 " &_
"AND ( product_name LIKE '%" & searchFor & "%' " &_
"OR product_description LIKE '%" & searchFor & "%') " &_
"ORDER BY product_name "

SET RS = Conn.Execute( sqlString )
IF NOT RS.EOF AND searchFor <> "" THEN
%>

View Replies View Related

Case Sensitive Password

I have tried searching various sites including this one and I cant find a straight forward answer.


Code:

strSQL = "SELECT user.username FROM user WHERE username = '" & myUsername & "' AND password = '" & myPassword & "';"

How do I check for case sensitivity?

View Replies View Related

First Letter In Upper Case

How to make first letter of word in upper case?
i.e. hello should return Hello
Is there any inbuilt function?

View Replies View Related

Upper-, Or Lowe-case

Since my website uses a font for headlines that doesn't exist on default in windows I want to dynamicly create my headlines with images(of characters)
For this to work nicely I have to detect if a character is upper or lower case.

Like the string

"Welcome"

Here I want to replace the "W" with a upperw.png and then replace "elcome" with lowere.png, lowerl.png, lowerc.png...and so on, you get the picture.

Is this possible in asp (vbscript) ? or java if It's possible to integrate into my vbscript page.

View Replies View Related

Case Include... Syntax

I'm trying to put together that standard case include method of building websites in ASP. The variable for the ASP switch comes from a query string.

<%
Select Case Request.QueryString("page")
case "home"
<!--#include file = "content/home.inc"-->
end select
%>

It isn't working, though... do you guys spot a syntax error or something??

View Replies View Related

Change Case For Text

I have a access database that has data where the people entered their name all in upper case or in various forms of upper and lower case. Can a change all the data so it is in a proper format. Example: This is Joe Smoe. Or change it to be all lower case for email addresses?

View Replies View Related

Case Sensitive Password

how can I make the password entered into a database case sensitive when a user tries to sign in?

View Replies View Related

Select Case Alternative

I would like to know if there is alterntiave to using Select Case?I have over 80 files that a user can select from a drop down list and 'read'. Rather than writing out 80+ lines with INC files, what is the other less code option?

View Replies View Related

InSTR Is Case Sensitive

Just used this code and noticed it doesn't always work, turns out InStr is case sensitive.What's thet best way to do a non-case sensitive search?pHP Code:

IF INSTR(VideoName,"HiRes") THEN 

View Replies View Related

Case-insensitive Dictionary

I need something like Scripting.Dictionary. but with case insensitive keys, i.e.

dict.Item("mykey") and dict.Item("MyKeY") should be identical.

View Replies View Related

Case Sensitive Queries

any way of searching a database without case sensitivity? Make any sense?! I have an Access 2000 db with 11 fields in it: Name, Keywords..., Description... But whenever I try to search through it using the ASp site I made, it'll only find matches if they are written identically, I.E a search for "bob" won't find the entry "Bob".

I thought about making the entire contents of the db Uppercase, but I don't want to, as that would look crap when the contents are displayed in the website.

View Replies View Related

Select Case Error

Using keyword "To" in select case giving error.The following code is got from www.microsrosoft.com itself. What is the wrong with this?.

<%
Dim Number1
Number1 = 7 ' Initialize variable.
Select Case Number1 ' Evaluate Number1.
Case 1 To 5 ' Number1 between 1 and 5, inclusive.
Response.Write( "Between 1 and 5" )
' The following is the only Case clause that evaluates to True.
Case 6, 7, 8 ' Number1 between 6 and 8.
Response.Write( "Between 6 and 8")
Case 9 To 10 ' Number1 is 9 or 10.
Response.Write( "Greater than 8")
Case Else ' Other values.
Response.Write( "Not between 1 and 10")
End Select
%>

View Replies View Related

Not A Case Sensitive Search

Below is my sql search code in my asp page. But my search seems to be case sensitive. How can i modify it to make it not case sensitive?

<%
sqlString = "SELECT product_image, product_name, product_description, product_price " &_
"FROM Products " &_
"WHERE product_status = 1 " &_
"AND ( product_name LIKE '%" & searchFor & "%' " &_
"OR product_description LIKE '%" & searchFor & "%') " &_
"ORDER BY product_name "

SET RS = Conn.Execute( sqlString )
IF NOT RS.EOF AND searchFor <> "" THEN
%>

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved