protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ListBox1.DataSource = OrdersGenericData.GetGenericOrders(); ListBox1.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { ListBox1 = new Obout.ListBox.ListBox(); ListBox1.ID = "ListBox1"; ListBox1.Width = Unit.Pixel(250); ListBox1.Height = Unit.Pixel(200); ListBox1.DataTextField = "ShipName"; ListBox1.DataValueField = "OrderID"; ListBox1Container.Controls.Add(ListBox1); if (!Page.IsPostBack) { ListBox1.DataSource = OrdersGenericData.GetGenericOrders(); ListBox1.DataBind(); } }