data binding

There are 1 entries for the tag data binding

Databinding Tips: Nesting Eval Statements

Maybe this is obvious, but it wasn’t obvious to me. I’m binding some data in a repeater that has the following output based on two numeric columns in my database. It doesn’t matter why or what the data represents. It’s just two pieces of data with some formatting: 42, (123) Basically these are two measurements. Initially, I would databind this like so: <%# Eval("First") %>, (<%# Eval("Second") %>) The problem with this is that if the first field is null, I’m left with this output. , (123) Ok, easy enough to fix using a format string: <%# Eval("First", "{0}, ") %>(<%# Eval("Second") %>) But now I’ve learned that...