Click here to Skip to main content
15,900,254 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am getting the following errors:-

ASM
Error 3 The type or namespace name 'ServiceReference3' does not exist in the namespace 'VotingPanel2' (are you missing an assembly reference?) C:\Users\Iram\Documents\Visual Studio 2008\Projects\VotingPanel2\VotingPanel2\MainPage.xaml.cs 13 20 VotingPanel2


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


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


Let me attach file where all these error are, do let me know if need further.

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();
            //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();
           
           
           //client.CheckSurveyExistAsync(this.Title.Text);
            
        }
      
    }
}
Posted
Updated 8-Oct-10 2:54am
v2
Comments
Sandeep Mewara 9-Oct-10 1:10am    
Update from OP:
its already been added in project,(in solution tree), and have
using VotingPanel2.ServiceReference3;

too

Have you added a project reference to the VotingPanel2 namespace?
 
Share this answer
 
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();



        }

        // Executes when the user navigates to this page.
        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 );



        }



    }
}


 
Share this answer
 
You need to add the service reference 'ServiceReference3' to your project.
 
Share this answer
 
yes its added already !!but its agian showing an error
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900