以下為設計步驟
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default
<!DOCTYPE html PUBLIC "
<html xmlns="
<head runat="server">
<title></title>
</head>
<body>
<form id="form
<div>
<asp:ObjectDataSource ID="ObjectDataSource
OldValuesParameterFormatString="original_{
TypeName="Repeater
</asp:ObjectDataSource>
<asp:Repeater ID="Repeater
onitemdatabound="Repeater
onitemcreated="Repeater
<HeaderTemplate>
類別表
<table border="
</HeaderTemplate>
<ItemTemplate>
<tr>
<td><%#Eval("CategoryID")%></td>
<td>
<asp:TextBox ID="TextBox
</td>
<td><%#Eval("Description")%></td>
<td><img alt="None" src=
</tr>
</ItemTemplate>
<AlternatingItemTemplate>
<tr>
<td style="background
<td style="background
<asp:TextBox ID="TextBox
</td>
<td style="background
<td style="background
</tr>
</AlternatingItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
</div>
</form>
</body>
</html>
protected void Repeater
{
if (e
{
TextBox tb = (TextBox)e
if (tb
{
tb
}
}
}
From:http://tw.wingwit.com/Article/program/net/201311/14067.html