her is the file

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()
            VotingPanel2.ServiceReference3.Service3Client client = new VotingPanel2.ServiceReference3.Service3Client();

            client.CheckSurveyExistCompleted += new EventHandler<VotingPanel2.ServiceReference3.CheckSurveyExistCompletedEventArgs>(client_CheckSurveyExistCompleted);

           // client.CheckSurveyExistAsync();


        // Executes when the user navigates to this page.
        protected override void OnNavigatedTo(NavigationEventArgs e)

        void client_CheckSurveyExistCompleted(object sender, VotingPanel2.ServiceReference3.CheckSurveyExistCompletedEventArgs e)
            //int a;
            //a = e.Result;
           // if a

           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.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 ); 

           // Service3Client client = new Service3Client();




and here is teh error

Error 1 The type or namespace name 'CheckSurveyExistCompletedEventArgs' does not exist in the namespace 'VotingPanel2.ServiceReference3' (are you missing an assembly reference?) C:\Users\Iram\Documents\Visual Studio 2008\Projects\VotingPanel2\VotingPanel2\CreateSurveyForm.xaml.cs 38 93 VotingPanel2

6 Years
Discussion Span
Last Post by erum

The error is saying that your "CheckSurveyExistCompletedEventArgs" class is not defined/exist in "VotingPanel2.ServiceReference3" namespace. You just need to follow the below steps :

1) Just make sure that "CheckSurveyExistCompletedEventArgs" class exist in the namespace.
2) remove the reference of "VotingPanel2.ServiceReference3" from your silverlight project.
3)Once again Build "VotingPanel2.ServiceReference3" project.
4) Now give reference again to your silverlight project.
5) build your entire project..

that's all..I belive once you follow above steps it will fix your error...


CheckSurveyExist is not teh calss but it is the method in service class

  public void CheckSurveyExist(string Title, string question, string option1, string option2, string option3)

        DataClasses2DataContext db2 = new DataClasses2DataContext();

        int highScoreCount =
            (from c in db2.Surveys
             where c.SurveyTitle == Title
             select c).Count();

        if (highScoreCount > 0)

            InsertSurveyData(Title, question, option1, option2, option3);


Edited by Reverend Jim: Fixed formatting

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.