复制代码 代码如下:
<asp:TemplateField>
<ItemStyle BorderWidth="1" BorderColor="#c0c0c0" />
<ItemTemplate>
<asp:CheckBox runat="server" />
</ItemTemplate>
</asp:TemplateField>
复制代码 代码如下:
<asp:Table runat="server" CssClass="table" CellPadding="2" CellSpacing="0">
<asp:TableHeaderRow BackColor="#efebde" BorderWidth="1" BorderColor="#c0c0c0">
<asp:TableHeaderCell BackColor="#efebde" BorderWidth="1" BorderColor="#c0c0c0">
Chinese Name
</asp:TableHeaderCell>
<asp:TableHeaderCell BackColor="#efebde" BorderWidth="1" BorderColor="#c0c0c0">
English Name
</asp:TableHeaderCell>
</asp:TableHeaderRow>
<asp:TableRow>
<asp:TableCell BorderWidth="1" BorderColor="#c0c0c0">
<asp:TextBox runat="Server" CssClass="textbox" />
</asp:TableCell>
<asp:TableCell BorderWidth="1" BorderColor="#c0c0c0">
<asp:TextBox runat="Server" CssClass="textbox" />
</asp:TableCell>
</asp:TableRow>
</asp:Table>
<div>
<asp:Button Text="Insert" runat="Server" />
<asp:Button Text="Update" runat="Server" />
<asp:Button Text="Delete" runat="Server"
CausesValidation="false" />
</div>
<asp:GridView runat="server" DataKeyNames="CutterTypeId" AutoGenerateColumns="false"
CellPadding="2" CellSpacing="0" BorderWidth="0" BorderColor="#c0c0c0"
RowStyle-Height="20" ShowHeader="false">
<Columns>
<asp:TemplateField>
<ItemStyle BorderWidth="1" BorderColor="#c0c0c0" />
<ItemTemplate>
<asp:CheckBox runat="server" />
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemStyle BorderWidth="1" BorderColor="#c0c0c0" />
<ItemTemplate>
<asp:TextBox runat="server" Text='<%# Eval("CName") %>'></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<asp:TemplateField>
<ItemStyle BorderWidth="1" BorderColor="#c0c0c0" />
<ItemTemplate>
<asp:TextBox runat="server" Text='<%# Eval("EName") %>'></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
复制代码 代码如下:
protected void ButtonInsert_Click(object sender, EventArgs e)
{
//do Insert something
//obj.Insert(......);
}
protected void ButtonUpdate_Click(object sender, EventArgs e)
{
//reference this url:
}
protected void ButtonDelete_Click(object sender, EventArgs e)
{
// string dataKeyNames = xxx;
// string[] arr = dataKeyNames.Substring(1).Split(',');
try
{
foreach (string s in arr)
{
//obj.Delter(s);
}
}
catch (Exception ex)
{
//alert exception message
}
}
新闻热点
疑难解答
图片精选