protected void Page_Load(object sender, EventArgs e) { DBRetriever retriever = new DBRetriever(); companiesList = (DropDownList)Page.FindControl("companiesList"); companiesList.DataSource = retriever.GetCompanyNames(); companiesList.DataBind(); }
protected void ValidateCompanyName(object sender, ServerValidateEventArgs args) { DBRetriever retriever = new DBRetriever(); args.IsValid = !retriever.ExistsCompany(name.Text) && name.Text.Length < 30; }
protected void Page_Load(object sender, EventArgs e) { retriever = new DBRetriever(); PopulateWithAllCheapestTravels(); }
protected void Page_Load(object sender, EventArgs e) { DBRetriever retriever = new DBRetriever(); companiesList.DataSource = retriever.GetCompanyNames(); companiesList.DataBind(); }