protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { AlternateContactRepository altContRepos = new AlternateContactRepository(); DataTable dt = altContRepos.GetAltContact(AppData.Instance.customer.CustomerID); AltContactView.DataSource = dt; AltContactView.DataBind(); if (dt.Rows.Count == 0) lbAltMessage.Text = string.Format("There are no alternate contacts for {0} {1}. Click below to add an alternate contact.", AppData.Instance.customer.FirstName, AppData.Instance.customer.LastName); else lbAltMessage.Text = string.Format("Add a new alternate contact for {0} {1}.", AppData.Instance.customer.FirstName, AppData.Instance.customer.LastName); } }