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 |
Define cookie.
What are server objects?
Is it necessary to create a Windows application or Web application to test a Web service ? Is it must to consume this service?
What is the base class from which web forms are inherited?
Is it possible to develop a single web application using ASP.NET webforms and ASP.MVC?
what is a virtual class?
What is the default Orientation property in a Menu control?
0 Answers Sans Pareil IT Services,
How do you add a javascript function for a link button in a datagrid?
Describe SOA and the tenets of it?
Write code to send e-mail from an asp.net application?
What are the advantages and disadvantages of viewstate ?
What is the difference between the response.write() and response.output.write() methods?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)