protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { TimerLogIn.Enabled = false; iAccountType = 0; iEmployeeKey = 0; txtLastName.Text = ""; txtFirstName.Text = ""; txtMiddleName.Text = ""; txtEmailAdd.Text = ""; txtDomainAccount.Text = ""; txtUserName.Text = ""; txtPassword.Text = ""; txtConfirmPassword.Text = ""; lblStatus.Text = ""; lblDomainAccount.Visible = false; txtDomainAccount.Visible = false; lblIDNum.Visible = false; txtIDNumber.Visible = false; DataTable dtUserType = AccountClass.UserTypeTable(); AccountType.DataSource = dtUserType; AccountType.DataTextField = "UserType"; AccountType.DataValueField = "PK"; AccountType.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { using (UniversalEntities entity = new UniversalEntities()) { AccountType.DataSource = entity.AccountTypes.ToList(); AccountType.DataBind(); lbMaritalStatus.DataSource = entity.MaritalStatusses.ToList(); lbMaritalStatus.DataBind(); } } }