protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { GridView1.DataSource = client.GetAllRestaurant(); GridView1.DataBind(); } }
private void LoadDropDownList() { DropDownList1.DataSource = client.GetAllRestaurant(); DropDownList1.DataTextField = "Name"; DropDownList1.DataValueField = "Id"; DropDownList1.DataBind(); }