Read txt File and Compare

Read txt File and Compare

am 17.04.2007 21:22:11 von 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

Re: Read txt File and Compare

am 18.04.2007 22:59:47 von Anthony Jones

"Simon Gare" wrote in message
news:eKIe1XSgHHA.3412@TK2MSFTNGP02.phx.gbl...
> 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-propert ies

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

>
> Regards
> Simon
>
> --
> Simon Gare
> The Gare Group Limited
>
> website: www.thegaregroup.co.uk
> website: www.privatehiresolutions.co.uk
>
>