This topic is locked

Conditional Formatting - is it possible?

8/7/2006 9:44:57 AM
ASPRunnerPro General questions
R
rgke author

I would like to try and format the colour and/or intensity (bold, normal) of some text dependant upon the value in the field (or perhaps another field).
eg. if amount is -ve, then put amount in bold and red.
Is it possible to do this, and if so, can it be done in a way which is preserved even if the pages are rebuilt?

J
Jane 8/8/2006

Ho,
you can do it to edit generated files manually.

Open ..._list.asp file, find looprs function and modify it in the following way:

Find following code snippet:

Response.Write ProcessLargeText(strData,"picfield=" & Server.URLEncode("amount") & "&where=" & Server.URLEncode(strImageWhere),"",MODE_LIST)



and replace it with this one

if rs("Quantity")<0 then

response.write "<font color=red><b>"

Response.Write ProcessLargeText(strData,"picfield=" & Server.URLEncode("amount") & "&where=" & Server.URLEncode(strImageWhere),"",MODE_LIST)

Response.write "</b></font>"

else

Response.Write ProcessLargeText(strData,"picfield=" & Server.URLEncode("amount") & "&where=" & Server.URLEncode(strImageWhere),"",MODE_LIST)

end if