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 boxing and unboxing in asp.net?

0 Answers  


What is CSS? What is the advantage os using CSS in ASP.NET Web Applications?

2 Answers   PCS,


What does AspCompat="true" mean and when should I use it?

1 Answers   Infogain,


where the stored procedure are written in business logic or data acess layer?

2 Answers  


Which data types are supported by the RangeValidator control?

2 Answers   Siebel,


Is asp.net and .net same?

0 Answers  


To make Cache item dependent on a file,directory or other cached item ,you should create an instance of which clause?

1 Answers  


can we pass values from one page to another page without redirecting to that page?

6 Answers   Google, Patni, Syntel, Wipro,


what r the Templeats in ASP.net?

5 Answers   Intel, VBV,


What are the difference between ASP and ASP.Net?

4 Answers   Accenture, Mphasis,


What is the use Membership in asp.net? and What is the use profiler in asp.net?

1 Answers  


How can we Validate a Controls in ASP.NET page using JavaScript?

0 Answers   QuestPond,


Categories