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 r the asp.net list controls and difference between them?

0 Answers  


What are the types of session in asp.net?

0 Answers  


What is the used of "ispostback" property?

0 Answers  


Explain the life cycle of an ASP .NET page

2 Answers   HCL, Surya Software,


Why does a user need nothing more than a Web browser to view ASP.NET pages?

1 Answers  






What is advantage of asp.net?

0 Answers  


What is the state management in asp.net?

0 Answers  


When we are requesting a new URL through Response.Redirect() the new page wil open on the new browser window or it wil open in the same window? If we use Server.Transfer() what wil happen?

1 Answers  


Explain the use of errorprovider control in .net?

0 Answers  


What is web.config. How many web.config files can be allowed to use in an application ?

10 Answers   Accenture, BirlaSoft, Infosys, InterGraph, Satyam, Wipro,


What is view state and use of it ?

1 Answers  


What are ASP.NET Web Forms? How is this technology different than what is available though ASP?

1 Answers   BirlaSoft,


Categories