webform1.aspx
来自「C#2005 实例源代码」· ASPX 代码 · 共 40 行
ASPX
40 行
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="WebForm1.aspx.cs" Inherits="WebForm1" %>
<!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 runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Repeater id="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand">
<ItemTemplate>
<asp:Label id=LabelCategoryName_i runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "CategoryName")%>' Width="200px">
</asp:Label>
<asp:Button id="ButtonEdit" runat="server" Text="编辑" CommandName="edit"></asp:Button>
<asp:Button id="ButtonSelect" runat="server" Text="选择" CommandName="select"></asp:Button>
<asp:Button id="ButtonDelete" runat="server" Text="删除" CommandName="delete"></asp:Button>
<asp:Panel ID="Panel1" Runat="server">
CategoryID:
<asp:Label id=LabelCategoryID_s runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "CategoryID")%>' Width="200px">
</asp:Label>
CategoryName:
<asp:Label id=LabelCategoryName_s runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "CategoryName")%>' Width="200px">
</asp:Label>
Description:
<asp:Label id=LabelDescription_s runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Description")%>' Width="200px">
</asp:Label>
<asp:Button id="ButtonBack" runat="server" Text="返回" CommandName="back"></asp:Button>
</asp:Panel>
</ItemTemplate>
<SeparatorTemplate>
<hr>
</SeparatorTemplate>
</asp:Repeater>
</div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?