</div>
<div class="rpt">
<asp:Panel ID="pnl" runat="server">
<asp:Repeater ID="rptList" runat="server">
<HeaderTemplate>
<table>
<tr class="rpttr">
<td align="center">
<span class="rptSpan">Category</span>
</td>
<td>
</td>
<td align="center">
<span class="rptSpan">Product Name</span>
</td>
<td align="center" class="rpttdWidth">
<span class="rptSpan">Priority</span>
</td>
<td align="center" class="rpttdWidth"
<span class="rptSpan">Price </span>
</td>
<td align="center" class="rpttdWidth">
<span class="rptSpan">Quantity</span>
</td>
<td align="center" class="rpttdWidth">
</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<tr class="rpttr">
<td align="center">
<asp:Label CssClass="rptmar" ID="Label5"
Width="130px" runat="server"
Text='<%#Eval("CategoryName") %>'>
</asp:Label>
</td>
<td align="center">
<img class="rptmar" style="border: solid 1px silver"
alt="Image" src='<%#Eval("ImagePath") %>'
width="100px" height="100px" />
</td>
<td align="center">
<a class="rpta" href="Default.aspx?ID=<%#Eval("Id") %>">
<asp:Label Style="text-decoration: underline"
ID="lblProName" Width="200px" runat="server"
Text='<%#Eval("ProductName") %>'>
</asp:Label>
</a>
<br />
<div style="text-align: left">
<span style="vertical-align: top; font-family: Verdana;
font-size:10px">color:</span>
<asp:Label ID="lblColor" BorderColor="Silver"
BorderWidth="2px" BorderStyle="Solid"
Width="30px" Height="25px" runat="server">
</asp:Label>
</div>
</td>
<td align="center">
<asp:Label CssClass="rptmar" ID="Label1" runat="server"
Text='<%#Eval("Priority") %>'></asp:Label>
</td>
<td align="center" style="font-family: Verdana; color: Red">
<asp:Label Style="margin-left: 10px" ID="Label3" runat="server"
Text="$"></asp:Label>
<asp:Label ID="Label2" runat="server"
Text='<%#Eval("Price")%>'></asp:Label>
</td>
<td style="margin: 10px" align="center">
<asp:Label CssClass="rptmar" ID="Label4" runat="server"
Text='<%#Eval("QuantityRequired") %>'></asp:Label>
</td>
<td style="width: 100px" align="center">
<a class="rptmar" style="background-color: #976ea4;
width: 150px; height: 50px; color: White;
text-decoration: none; border: dashed 1px white"
href="Buy.aspx?BID=<%#Eval("BID") %>">
Buy it!</a>
</td>
</tr>
<tr>
<td colspan="7">
<div style="border: dashed 0.1em maroon">
</div>
</td>
</tr>
</div>
</ItemTemplate>
<FooterTemplate>
<tr class="rpttr">
<td colspan="7" align="center">
<asp:Label Height="30px" Style="color: White;
font-family: Verdana; font-size: 20px"
ID="lblFotterName" runat="server"></asp:Label>
</td>
</tr>
</table>
</FooterTemplate>
</asp:Repeater>
</asp:Panel>
</div>
</div>
--------------------------------------------------------------------
aspx:CS
protected void Page_Load(object sender, EventArgs e)
{
View();
ViewName();
}
public void View()
{
UserID = Session["UserId"].ToString();
Select = "Select * From Product Where UserID='" + UserID + "'";
da = new SqlDataAdapter(Select, Conn);
da.Fill(ds);
rptList.DataSource = ds;
rptList.DataBind();
foreach (RepeaterItem rpt in rptList.Items)
{
Label lbl = (Label)rpt.FindControl("lblColor");
lbl.Attributes.Add("style", "background-color:" +
ds.Tables[0].Rows[rpt.ItemIndex]["Color"] + ";");
}
}
Find Controls:
public void ViewName()
{
SelectName = "Select
GroomName,BrideName,CONVERT(Varchar(20),WeddingDate,107)
WeddingDate From Registration Where UserId='" + UserID + "'";
da = new SqlDataAdapter(SelectName, Conn);
da.Fill(ds, "Name");
GroomName = ds.Tables["Name"].Rows[0]["GroomName"].ToString();
BrideName = ds.Tables["Name"].Rows[0]["BrideName"].ToString();
WedDate = ds.Tables["Name"].Rows[0]["WeddingDate"].ToString();
lblGroomName.Text = GroomName + " & " + BrideName + "'s wedding
on " + WedDate;
Find Controls:
Label lblFotter = rptList.Controls[rptList.Controls.
Count - 1].FindControl("lblFotterName") as Label;
lblFotter.Text = GroomName+" & "+BrideName+" 's";
}
-------------------------------------------------
Screen:
Footer Design: