01 | <%@ Page Language="C#" AutoEventWireup="true" |
02 | CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication3.WebForm1" %> |
06 | < form id = "form1" runat = "server" > |
09 | < asp:Label ID = "Label2" runat = "server" Text = "Course title:" ></ asp:Label > |
10 | < asp:TextBox ID = "title" runat = "server" Width = "203px" ></ asp:TextBox > |
11 | < asp:Button ID = "Add" runat = "server" OnClick = "Add_Click" Text = "Add" /> |
12 | < asp:Label ID = "Label3" runat = "server" Text = "Student name:" ></ asp:Label > |
13 | < asp:TextBox ID = "studentName" runat = "server" Width = "159px" ></ asp:TextBox > |
14 | < asp:Label ID = "Label4" runat = "server" Text = "Course list:" ></ asp:Label > |
15 | < asp:Button ID = "Reset" runat = "server" Text = "Reset" /> |
17 | < asp:SqlDataSource ID = "enrollment" runat = "server" |
18 | ConnectionString="<%$ ConnectionStrings:ConnectionString2 %>" |
19 | ProviderName="<%$ ConnectionStrings:ConnectionString2.ProviderName %>" |
20 | SelectCommand="SELECT [title] FROM [Courses] ORDER BY [title]"> |
23 | < asp:CheckBoxList ID = "courseList" runat = "server" DataSourceID = "enrollment" |
24 | DataTextField = "title" DataValueField = "title" AutoPostBack = "True" > |
25 | < asp:ListItem ></ asp:ListItem > |
28 | < asp:Label ID = "Result" runat = "server" ></ asp:Label > |
|