public void Displaydata() { productservice.Service1Client c1 = new productservice.Service1Client(); List <productservice.Car> car = c1.getcar().ToList(); repmyads.DataSource = car; repmyads.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { productservice.Service1Client c1 = new productservice.Service1Client(); List <productservice.Car> car = c1.getcar().ToList(); List <productservice.Electronic> laptop = c1.GetElectronics().ToList(); //car.ForEach(item => laptop.Add(item)); Repeater1.DataSource = car; Repeater1.DataBind(); // int i1 = car.Count(); }