Repeater Control (2.0) and No Data

Nate Bross

Well-known member
Joined
Apr 6, 2005
Messages
601
Location
Chicago, IL
I am just wondering if there is a way I can check to see if one of my columns is empty before I display it in my repeater control.

Code:
                            <table width="100%">
                                <tr> 
                                    <td>
                                        <p>
                                            <i>Materials: <%#DataBinder.Eval(Container.DataItem, "Materials", "{0:c}")%></i>
                                        </p>
                                    </td>
                                    <td>
                                        <p>
                                            <i>Tuition: <%#DataBinder.Eval(Container.DataItem, "Tuition","{0:c}") %></i> 
                                        </p>
                                    </td>
                                </tr>
                            </table>

I want to make sure that the Materials cost is <> 0. If it is <> 0 I want to do what is above, if its = 0 I want to skip that entire <td>...</td> section

Thanks!
 
Back
Top