protected void editAgency_Click(object sender, EventArgs e) { HttpChannel chnl = new HttpChannel(); try { ChannelServices.RegisterChannel(chnl, false); } catch (RemotingException ex) { //all good, nobody cares, but we log it } mgr = (INewsManager)Activator.GetObject(typeof(INewsManager), "http://localhost:1234/NewsManager.soap"); Agency agencyObj = new Agency(); agencyObj.id = Convert.ToInt32(hiddenID.Value); agencyObj.city = CityTxt.Text; agencyObj.language = LanguageTxt.Text; mgr.updateAgency(agencyObj); Agency[] Array_L = mgr.getAgencies(); DataTable dt = new DataTable(); dt.Columns.Add("AgencyID"); dt.Columns.Add("City"); dt.Columns.Add("Language"); for (int i = 0; i < Array_L.Count(); i++) { dt.Rows.Add(); dt.Rows[i]["AgencyID"] = Array_L[i].id.ToString(); dt.Rows[i]["City"] = Array_L[i].city.ToString(); dt.Rows[i]["Language"] = Array_L[i].language.ToString(); } GridView1.DataSource = dt; GridView1.DataBind(); }