View Code for Web/WebControls/EditEnrollment.ascx

Source code for the file Web/WebControls/EditEnrollment.ascx is shown below.

<%@ Control CodeBehind="EditEnrollment.ascx.cs" Inherits="QuantumConcepts.CodeGenerator.Sample.Web.WebControls.EditEnrollment" Language="C#" %>
<%@ Register TagPrefix="Common" TagName="TabularPanel" Src="~/WebControls/TabularPanel.ascx" %>
<%@ Register TagPrefix="Common" TagName="TabularPanelRow" Src="~/WebControls/TabularPanelRow.ascx" %>
<%@ Register TagPrefix="Common" TagName="TabularPanelField" Src="~/WebControls/TabularPanelField.ascx" %>

<Common:TabularPanel runat="server">
  <Rows>
    <Common:TabularPanelRow>
      <Fields>
        <Common:TabularPanelField>
          <Label>Student:</Label>
          <Value>
            <asp:DropDownList ID="StudentField" runat="server" AppendDataBoundItems="true" DataValueField="ID" DataTextField="FullName">
              <asp:ListItem Text="Select..." />
            </asp:DropDownList>
            <Common:FieldValidator ID="StudentIDValidator" runat="server" TargetControlID="StudentField" FieldName="Student" Required="true" />
          </Value>
        </Common:TabularPanelField>
      </Fields>
    </Common:TabularPanelRow>
    <Common:TabularPanelRow>
      <Fields>
        <Common:TabularPanelField>
          <Label>Course:</Label>
          <Value>
            <asp:DropDownList ID="CourseField" runat="server" AppendDataBoundItems="true" DataValueField="ID" DataTextField="FullName">
              <asp:ListItem Text="Select..." />
            </asp:DropDownList>
            <Common:FieldValidator ID="CourseIDValidator" runat="server" TargetControlID="CourseField" FieldName="Course" Required="true" />
          </Value>
        </Common:TabularPanelField>
      </Fields>
    </Common:TabularPanelRow>
  </Rows>
  <Actions>
    <asp:LinkButton ID="SaveButton" runat="server" Text="Save" CssClass="Action Accept" OnClick="SaveButton_Click" />
    <asp:LinkButton ID="CancelButton" runat="server" Text="Cancel" CssClass="Action Cancel" OnClick="CancelButton_Click" />
  </Actions>
</Common:TabularPanel>