<body>
<form id="forml" runat="server">
<div>
<asp:Label ID="Label1" runat="server" Text="Click Me">
</asp:Label><br />
<br />
<br />
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click"
Text="Button" />
</div>
</form>
</body>
</html>
Рис 2.20. Выбор модели кодирования
Следующие листинги файлов TestFormCodeBehind.aspx и TestFormCodeBehind.aspx.cs иллюстрируют разделение страницы на две части с использованием модели скрытого кода. Вот как выглядит файл TestFormCodeBehind.aspx:
<%@ Page Language="C#"
AutoEventWireup="true"
CodeFile="TestFormCodeBehind.aspx.cs"
Inherits="TestFormCodeBehind" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Test Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
предыдущая следующая страница оглавление
85