Link to home
Start Free TrialLog in
Avatar of ITsolutionWizard
ITsolutionWizardFlag for United States of America

asked on

asp.net repeater

What I hope to do is below:
if <%# Eval("DailyRate") %> != ""
 show table1
else
 hide table1

Is it possible?

<asp:Repeater runat="server" ID="classACoachList">
            <ItemTemplate>
                <div class="property span3">
            <div class="image">
                <div class="content">
                    <a target="_blank" href="RVRentalCoach.aspx?VehicleID=<%# Eval("VehicleID") %>&VID=<%# Eval("VehicleID") %>&Vname=<%# Eval("VehName")%>&Make=<%# Eval("Make") %>&Type=<%# Eval("Type") %>&Location=Stanton, CA&DailyRate=<%# Eval("DailyRate") %>" ></a>
                    <img src="http://www.sharemycoach.com//UserData/VehicleImages/<%# Eval("VehicleID") %>/medium/Primary.jpg" alt="<%# Eval("MakeModel") %>">
                </div><!-- /.content -->

                <div style="display:none;" class="price">1 250 000€</div><!-- /.price -->
                <div style="display:none;" class="reduced">Reduced </div><!-- /.reduced -->
            </div><!-- /.image -->

            <div class="title">
                <h2><a target="_blank" href="RVRentalCoach.aspx?VehicleID=<%# Eval("VehicleID") %>&VID=<%# Eval("VehicleID") %>&Vname=<%# Eval("VehName")%>&Make=<%# Eval("Make") %>&Type=<%# Eval("Type") %>&Location=LA, CA&DailyRate=<%# Eval("DailyRate") %>" >
                     <%# Eval("VehName")%>
                    </a></h2>
            </div><!-- /.title -->

            <div class="location">LA, CA</div><!-- /.location -->
            <div class="area">
                <span class="key">Price:</span><!-- /.key -->
                <span class="value"><%# Eval("DailyRate") %></span><!-- /.value -->
            </div><!-- /.area -->
            <div class="bedrooms"><div class="content">4</div></div><!-- /.bedrooms -->
            <div class="bathrooms"><div class="content">1</div></div><!-- /.bathrooms -->

                     



<table id=table1>     
<tr>
                            <td style="text-align:center;">
                                <object>
                                    <param name="movie" value='http://www.youtube.com/v/WQxExGmkMfo?version=3&feature=player_embedded&autohide=1' />
                                    <param name="allowFullScreen" value="true" />
                                    <param name="allowScriptAccess" value="always" />
                                    <embed src='http://www.youtube.com/v/WQxExGmasdfasdfadskMfo?version=3&feature=player_embedded&autohide=1' type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="720" height="405" />
                                </object>
                            </td>
                        </tr>
</table>
        

</div>
            </ItemTemplate>
        </asp:Repeater>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Shalu M
Shalu M
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Any feedback so far?

Have you tried out the my suggestion? that should work for you.
Please close this inactive question and assign points to the 2 experts who have provided workable solutions.
Both solutions worked well to resolve the issue.