using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.IO; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { Label1.Text = DateTime.Now.ToString(); DirectoryInfo di = new DirectoryInfo(Server.MapPath("~")); GridView1.DataSource = di.GetFiles(); GridView1.DataBind(); int[] bussid = {150, 724, 723}; GridView2.DataSource = bussid; GridView2.DataBind(); object[] lapsed ={ new {vanus=5, pikkus=120}, new {vanus=3, pikkus=100}, new {vanus=4, pikkus=115} }; GridView3.DataSource = lapsed; GridView3.DataBind(); Laps[] opilased ={ new Laps("Juku", 2001), new Laps("Kati", 2002) }; GridView4.DataSource = opilased; GridView4.DataBind(); DropDownList1.DataSource = opilased; DropDownList1.DataTextField = "Eesnimi"; //muidu ToStringi oma DropDownList1.DataBind(); } }