protected void Page_Load(object sender, EventArgs e) { var bl = new CustomerLogic(); CustomersList.DataSource = bl.LoadCustomers().Solution.ToList(); CustomersList.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { List <string> names = new List <string>(); for (int i = 0; i < 99; i++) { names.Add("John Doe" + i.ToString()); } //CustomersGridView.DataSource = names; //CustomersGridView.DataBind(); CustomersList.DataSource = names; CustomersList.DataBind(); }
void CustomerEditor_Init(object sender, EventArgs e) { EnsureChildControls(); CustomerTableAdapter adapter = new CustomerTableAdapter(); CustomersList.DataSource = adapter.GetData(); CustomersList.DataTextField = "CompanyName"; CustomersList.DataValueField = "CustomerID"; CustomersList.DataBind(); CustomersList.Items.Insert(0, ""); }
protected void Page_Load(object sender, EventArgs e) { List <string> names = new List <string>(); for (int i = 0; i < 99; i++) { names.Add("John Doe" + i.ToString()); } // CustomerGridView.DataSource = names; // Bind the data into the GridView table. This is called an Item control- // CustomerGridView.DataBind(); // For the bullet list. CustomersList.DataSource = names; CustomersList.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { //Create a list of values for the controls to display List <string> names = new List <string>(); for (int i = 0; i < 99; i++) { names.Add("John Doe" + i.ToString()); } //Assign and bind to datagrid CustomersGridView.DataSource = names; CustomersGridView.DataBind(); //Assign and bind to bullet list CustomersList.DataSource = names; CustomersList.DataBind(); }