Avatar of ITsolutionWizard
ITsolutionWizard
Flag 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

ASP.NETC#

Avatar of undefined
Last Comment
Ryan Chong

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Shalu M

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Ryan Chong

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Ryan Chong

Any feedback so far?

Have you tried out the my suggestion? that should work for you.
Shalu M

Please close this inactive question and assign points to the 2 experts who have provided workable solutions.
Ryan Chong

Both solutions worked well to resolve the issue.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck