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
Define page fragment caching?
How many types of Cookies are available in ASP.NET?
Explain what are the advantages of asp.net mvc framework? : asp.net mvc
Explain asp.net mvc request life cycle? : asp.net mvc
What does the .webpart file do?
What is the most appropriate lifetime for a database connection/orm context in an asp.net mvc application? : Asp.Net MVC
Can I combine classic asp and asp.net pages?
benefits of migration from asp to asp.net hi frnds, i have to give presentation to a client about how useful would be migrating their project from asp to asp.net .plz give me some points which i should incorporate in my ppt thanks
Hi this is the coding for adding data in to an xml table
i want the coding for update and delete
Try
Dim emp_xml_doc As New XmlDocument
If
System.IO.File.Exists(Server.MapPath("emp.xml")) Then
emp_xml_doc.Load(Server.MapPath("emp.xml"))
Dim myrow_element As XmlElement
myrow_element =
emp_xml_doc.CreateElement("EmpDetails")
Dim str As String
str = "
Where is the session stored?
What are themes and skins in 2.0, explain usage scenario?
What is view state management in asp net?
What is difference between asp.net and asp.net mvc? : Asp.Net MVC
What do you mean by authorization?
What is cross page posting? How is it done?