Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old April 17th, 2007, 08:35 PM
Simon Gare
Guest
 
Posts: n/a
Default Read txt File and Compare

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\AmacExpre ssServices\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


  #2  
Old April 18th, 2007, 10:05 PM
Anthony Jones
Guest
 
Posts: n/a
Default Re: Read txt File and Compare


"Simon Gare" <simon@simongare.comwrote in message
news:eKIe1XSgHHA.3412@TK2MSFTNGP02.phx.gbl...
Quote:
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\AmacExpre ssServices\Constants\areas
Quote:
.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...und-properties

Note that an inline style attribute should contain syntax that is valid
between { } in a style element or a CSS file.
Quote:
>
Regards
Simon
>
--
Simon Gare
The Gare Group Limited
>
website: www.thegaregroup.co.uk
website: www.privatehiresolutions.co.uk
>
>

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles