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
Is post back property in asp net?
What is redirecting behavior?
What is sdlc process?
What is viewstate in asp net with example?
What is a server farm in iis?
Explain the main function of url routing system in asp.net mvc? : asp.net mvc
Is sql backend or frontend?
For which does this Codebehind="MyCode.aspx.cs" is relevent to ?
What is ipostback?
What are the data controls available in asp.net?
What is the function of the ViewState property?
What is route in web api?
How to do parallel database export in remote SQL Server in ESSL time track. It is working for local server but not working for remote SQL Server
Why we use content place holder in asp.net?
can any one find and tell the difference between dot net and php which one is best ? which one we get more salary? which one is stable and which one is best for freshers and also better in future and carrer ? which one we wil get more salary sir ? please send ur valuable suggestions to kiranpulsar2007@gmail.com