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

Answers were Sorted based on User's Feedback



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

Answer / sunayana

Use the AlternatingItemTemplate

Is This Answer Correct ?    11 Yes 2 No

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

Answer / manas

AlternatingItemTemplate

Is This Answer Correct ?    7 Yes 1 No

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

Answer / 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

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

Answer / sony

use colortemplete

Is This Answer Correct ?    0 Yes 0 No

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

Answer / aadesh kumar

AlternatingItemTemplate Like the ItemTemplate element, but rendered for every other row (alternating items) in the Repeater control. You can specify a different appearance for the AlternatingItemTemplate element by setting its style properties.

Is This Answer Correct ?    0 Yes 0 No

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

Answer / surendra singh

Using the AlternatintItemTemplate

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

What is caching? What are the different types of caching?

6 Answers  


Finally and dispose methods?

1 Answers   Microsoft,


What is mta?

0 Answers  


Asp pages that worked pefectly on windows 2000 server and iis 5.0 do not work on windows 2003 server with iis 6.0. Asp.net pages work fine. Why?

0 Answers  


My website has around 100 aspx. Out of this, a certain 20 aspx files should be made available to the users only if they are logged in. How can I achieve this with the web.config file?

1 Answers   Techno Solutions,






What is a swagger in web api?

0 Answers  


Explain how cookies work.

0 Answers  


How does a content page differ from a master page?

0 Answers  


How to set the pane area to transparent of a scrollPane component.?

0 Answers   MCN Solutions,


WHAT IS polymorphism

2 Answers   Fidelity,


what is asp.net

4 Answers  


What are url fragments?

0 Answers  


Categories