Read txt File and Compare

S

Simon Gare

Hi all,

have a text file that is read in an asp page

<%
Dim arrFileLines()
i = 0
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile =
objFSO.OpenTextFile("D:\Inetpub\Websites\AmacExpressServices\Constants\areas
..txt", 1)

Do Until objFile.AtEndOfStream
Redim Preserve arrFileLines(i)
arrFileLines(i) = objFile.ReadLine
i = i + 1
Loop
objFile.Close

%>

What i need to do further down is something like this to change the row bg
color.

<<% IF arrFileLines() <> BookingForm.Fields.Item("COLL_CITY_TOWN").Value
Then response.write "style='background=#CCCCFF'"%>>

Doesnt work like in this format.

Regards
Simon

--
Simon Gare
The Gare Group Limited

website: www.thegaregroup.co.uk
website: www.privatehiresolutions.co.uk
 
A

Anthony Jones

Simon Gare said:
Hi all,

have a text file that is read in an asp page

<%
Dim arrFileLines()
i = 0
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile =
objFSO.OpenTextFile("D:\Inetpub\Websites\AmacExpressServices\Constants\areas
.txt", 1)

Do Until objFile.AtEndOfStream
Redim Preserve arrFileLines(i)
arrFileLines(i) = objFile.ReadLine
i = i + 1
Loop
objFile.Close

%>

What i need to do further down is something like this to change the row bg
color.

<<% IF arrFileLines() <> BookingForm.Fields.Item("COLL_CITY_TOWN").Value
Then response.write "style='background=#CCCCFF'"%>>

Doesnt work like in this format.

try:- style="background-color:#CCCCFF"

http://www.w3.org/TR/REC-CSS2/colors.html#background-properties

Note that an inline style attribute should contain syntax that is valid
between { } in a style element or a CSS file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top