This topic is locked

Interogating fields in a row in the List View.

8/14/2009 6:16:34 PM
ASPRunnerPro General questions
S
sfkjeld author

Depending on the value of a field in the row being displayed in the List, I want to show an icon. I added a code snippet to the listview under one of the fields that is being displayed. But I can't figure out how to determine the field's value.
I thought it would be rs("FieldName").

C
clig 8/14/2009

Depending on the value of a field in the row being displayed in the List, I want to show an icon. I added a code snippet to the listview under one of the fields that is being displayed. But I can't figure out how to determine the field's value.

I thought it would be rs("FieldName").


I thought it was strValue= "value of field"

J
Jane 8/17/2009

Hi,
field values are stored in the rs array.

Here is a sample:

if rs("FieldName")="test" then

strValue = "<img src=...>"

end if

S
sfkjeld author 8/17/2009

I was using the rs() array.
if rs("FieldName")="test" then
I must be putting the code segment in the wrong place. I placed the snippet in the "List Page" underneath one of the column fields. The error message reports "Operation is not allowed when the object is closed.".
Where should it go?

J
Jane 8/18/2009

Hi,
you should place this code on the "View as" settingsdialog on theVisual Editortab.