J
Jeronimo Bertran
I am currently using databing to show on an asp:label the result of
appending two database fields in the following way:
<asp:label id=textAcknowledgedBy runat="server" Text='<%# DataBinder.Eval
(dataSetEventResponse1, "Tables[spEventDetails].DefaultView.[0].UserName")
+ " from " + DataBinder.Eval(dataSetEventResponse1, "Tables
[spEventDetails].DefaultView.[0].ComputerName") %>'></asp:label>
This works fine, but now I need to make it a bit more complex and check if
the UserName field is null and in case it is, display the name of the
current user (which is obtained from a session variable).
How can I achieve this?
Thanks,
Jeronimo Bertran
appending two database fields in the following way:
<asp:label id=textAcknowledgedBy runat="server" Text='<%# DataBinder.Eval
(dataSetEventResponse1, "Tables[spEventDetails].DefaultView.[0].UserName")
+ " from " + DataBinder.Eval(dataSetEventResponse1, "Tables
[spEventDetails].DefaultView.[0].ComputerName") %>'></asp:label>
This works fine, but now I need to make it a bit more complex and check if
the UserName field is null and in case it is, display the name of the
current user (which is obtained from a session variable).
How can I achieve this?
Thanks,
Jeronimo Bertran