How can you provide an alternating color scheme in a
Repeater control?
Answers were Sorted based on User's Feedback
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 |
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 |
What is caching? What are the different types of caching?
Finally and dispose methods?
What is mta?
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?
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?
What is a swagger in web api?
Explain how cookies work.
How does a content page differ from a master page?
How to set the pane area to transparent of a scrollPane component.?
WHAT IS polymorphism
what is asp.net
What are url fragments?