Click here to Skip to main content
15,904,024 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
this is my source file...
XML
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
      <asp:Repeater ID="rptrTable" runat="server"
            onitemcommand="rptrTable_ItemCommand" >

        <HeaderTemplate>
        <table border="2">
                        <tr bgcolor="#00ff66">
        <table border=3>
        <tr>
        <th>Agent ID</th>
        <th>First Name</th>
        <th>Last Name</th>
        <th>City</th>
        <th>SSN</th>
        </tr>

        </HeaderTemplate>
        <ItemTemplate>
        <tr>

        <td>
        <%# DataBinder.Eval(Container.DataItem,"AgentID") %>
        </td>
        <td>
        <%# DataBinder.Eval(Container.DataItem,"FirstName") %>
        </td>
        <td>
        <%# DataBinder.Eval(Container.DataItem,"LastName") %>
        </td>
        <td>
        <%# DataBinder.Eval(Container.DataItem,"City") %>
        </td>
        <td>
        <%# DataBinder.Eval(Container.DataItem,"SSN") %>
        </td>

        <td>
            <asp:Button ID="btnShow" runat="server" Text="Show" CommandName="ShowButt" CommandArgument='<%# Eval("FirstName") %>' />
        </td>
        <td>
            <asp:Button ID="btnEdit" runat="server" Text="Edit" CommandName="EditButt" />
        </td>

        </tr>
        </ItemTemplate>

        </asp:Repeater>
        <br />
        <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
    </div>
    </form>
</body>
</html>


but by using AlternateTemplate records in table need to be display in alternate colours .. but where i use this alternate templete in above source file to get the records in alternate colour plz help ,,,,
Posted

 
Share this answer
 
 
Share this answer
 
Comments
Member 8557191 24-Jan-12 6:09am    
ALL ABOVE CODES ARE NOT WORKING FOR MY SOURCE FILE TO DISPLAY RECORDS IN ALTERNATE COLOURS

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900