here is teh full code
<pre lang="msil">using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Windows.Navigation;
using VotingPanel2.ServiceReference3;
namespace VotingPanel2
{
public partial class CreateSurveyForm : Page
{
public CreateSurveyForm()
{
InitializeComponent();
VotingPanel2.ServiceReference3.Service3Client client = new VotingPanel2.ServiceReference3.Service3Client();
}
protected override void OnNavigatedTo(NavigationEventArgs e)
{
}
void client_CheckSurveyExistCompleted(object sender, VotingPanel2.ServiceReference3.CheckSurveyExistCompletedEventArgs e)
{
MessageBox.Show(e.Result.ToString ());
}
private void Button_Click(object sender, RoutedEventArgs e)
{
Service3Client client = new Service3Client();
client.CheckSurveyExistCompleted += new EventHandler<VotingPanel2.ServiceReference3.CheckSurveyExistCompletedEventArgs>(client_CheckSurveyExistCompleted);
client.CheckSurveyExistAsync(this.Title.Text,this.SurveyQuestion.Text,this.Surveyoption1.Text,this.Surveyoption2.Text,this.Surveyoption3.Text );
}
}
}