/ Published in: C#
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
System.Runtime.Serialization private void button1_Click(object sender, EventArgs e) { EndpointAddress endpointAddress = new EndpointAddress("<a href="http://localhost:1031/Service/Person.svc"" rel="nofollow">http://localhost:1031/Service/Person.svc"</a>;); IPersonService personService = new ChannelFactory<IPersonService>(basicHttpBinding, endpointAddress).CreateChannel(); Person person = personService.GetPersonData("F488D20B-FC27-4631-9FB9-83AF616AB5A6"); textBox1.Text = Convert.ToString("Name:"+person.FirstName + "\t" + "Last Name:"+person.LastName + "\t" + "Guid:"+person.Guid+"\t"+"Postal Code:"+person.PostalCode+"\t"+"State:"+person.State+"\t"+"City:"+person.City); }