void DisplayOrders() { ClassLibrary.clsOrderCollection Orders = new ClassLibrary.clsOrderCollection(); LstOrders.DataSource = Orders.OrderList; LstOrders.DataValueField = "OrderID"; LstOrders.DataTextField = "GameTitle"; //display game titles on viewpage form LstOrders.DataBind(); //bind ID and titles }
void DisplayOrders() { ClassLibrary.clsOrderCollection Orders = new ClassLibrary.clsOrderCollection(); lstOrderList.DataSource = Orders.OrderList; lstOrderList.DataValueField = "OrderNumber"; lstOrderList.DataTextField = "OrderPrice"; lstOrderList.DataBind(); }
void DisplayOrders() { ClassLibrary.clsOrderCollection Orders = new ClassLibrary.clsOrderCollection(); ListBoxOrder.DataSource = Orders.OrderList; //set name of primary key ListBoxOrder.DataValueField = "OrderNo"; //set data field to display ListBoxOrder.DataTextField = "ProductName"; //blind data to list ListBoxOrder.DataBind(); }
void DisplayOrders() { //Create an instance of the Shipping Address Collection ClassLibrary.clsOrderCollection Addresses = new ClassLibrary.clsOrderCollection(); //Set the data source to the list of Shipping Address in the collection lstOrders.DataSource = Addresses.OrderList; //Set the name of the primary key lstOrders.DataValueField = "OrderId"; //Set the data field to display lstOrders.DataTextField = "ShippingAddress"; //Bind the data to the list lstOrders.DataBind(); }