label in itemtemplate of listview
Posted on 2010-08-12
I have a listview bound to a datacontrol.
In the ItemTemplate I want to show a label and database value for every record where the database value is not null. so I have
Visible='<%# Not IsDBNull(Eval("status_last"))%>'
Text="<br />Record status was changed from "
Enabled = "true">
Now... what is supposed to happen is that IF the database field named status_last is not null THEN the label should become visible and the text should read:
Record status was changed from XX (where XX should be the value in the database field named old_status).
As it is, the above code will work.... but I can't get the text property to include both literal text AND a database value... I can manage one or the other, but not both.
I have tried every possible combination of single and double quotes etc.
Does anyone know the proper format here?