I am building my first application for windows phone 7 where i have a form with the following text fields and 1 radio button. The name of the textfields in the form is: name, age, sadd, cadd, eadd, phn, zip. The xaml code for the radio button is:
Code
Now i want to send these data on clicking the submit button to a webmethod "registertoteam" in the following webservice:
http://ws.clearwintech.com/aap.asmx
The method contains the following fields: name, street_address, city_address, zip_code, phone_no, email_address, age, gender.
I know how to call a web service. Previously i have done on showing data from web service in my application. Now i want to send the values from the form to the web method:
I have written the following code so far:
TypeScript
private void submit_Click(object sender, RoutedEventArgs e)
{
if (name.Text == String.Empty)
{
MessageBox.Show("Please Enter the name");
name.Focus();
}
else
{
var svc = new KejriwalService.aapSoapClient();
svc.registerToTeamAsync(name.Text, sadd.Text, cadd.Text, zip.Text, eadd.Text, phn.Text, age.Text);
}
}
Biswa Pujarini MohapatraRank #465 · 5.4K reputationPosted Feb 14, 2014, 2:47 PM EST
http://www.codeproject.com/Articles/196996/Consuming-WCF-Service-from-Windows-7-Phone-Applica