Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How can you provide an alternating color scheme in a
Repeater control?

Answer Posted / rey vegafria

in UI...

<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<tr bgcolor="<%#getColor()%>">
<td align="center"><%#Container.DataItem("name")%></td>
</tr>
</ItemTemplate>
</asp:Repeater>


in Source Code...

Partial Class _Default
Dim strColor As String = "#ffffff"
...

Function getColor()
If strColor = "#ffffff" Then
strColor = "#E0F4F8"
getColor = "#ffffff"
Else
strColor = "#ffffff"
getColor = "#E0F4F8"
End If
End Function

End Class

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a form tag?

932


When cookie will expire?

1051


Do you support digital rights management to protect my videos?

910


What are the media types of http requests and response?

1039


What is the difference between page directive include and action tag include?

995


Define what is razor? : asp.net mvc

1054


Explain asp.net web forms.

1145


What is web api vs wcf?

1066


Why do we need a web application session?

1036


Is session server side or client side?

1017


How to implement globalization and localization in the use interface in .net.

1068


If you want to write your own dot net language, what steps you will you take care?

1158


What is applicatio domain?

1061


Define cookie.

1034


How do you implement sql caching in asp.net?

1107