Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6013197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:30:49+00:00 2026-05-23T02:30:49+00:00

Facing some problem calling methods in Silverlight. Here’s the scenario :– My service agent

  • 0

Facing some problem calling methods in Silverlight.
Here’s the scenario :–

My service agent contains the method which is calling a method in WCF service. The way i am calling is this :

   public void GetMethod(EventHandler<GetMethodCompletedEventArgs> callback)
    {
        _Proxy.GetMethodCompleted += callback;
        _Proxy.GetMethodAsync();
    }

I am calling this method in the View Model like this

private void SomeMethod()
{
ServiceAgent.GetMethod(inputVariable, new EventHandler<GetMethodCompletedEventArgs>(OnGetMethod_Completed));
}

void OnGetMethod_Completed(GetMethodCompletedEventArgs e)
{
int result = e.Result;
}

I have attached the method in the view model to a button in the UI.

Now the problem is, if i press the button first time everything works fine, if i press it twice the OnGetMethod_Completed() gets executed 2 time for one button click(i.e. 2nd button click), when i press it the third time it get executed 3 times and so on…
I really don’t get it why this is happening, if anybody does then please help me out.

Thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T02:30:50+00:00Added an answer on May 23, 2026 at 2:30 am

    you need to unregister from the completed event on your OnGetMethod_Completed

    void OnGetMethod_Completed(GetMethodCompletedEventArgs e)
    {
      int result = e.Result;
      _Proxy.GetMethodCompleted  -= OnGetMethod_Completed
     }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Yii beginner here. I am facing some problem with how to query the database
Scenario: I have configured SQOOP on my PC. But I am facing some problem
I'm facing a great problem here and i need some clarifications Here is my
I am facing some problem with MySQL database. actually It was fast when I
I am facing some problem in iPhone application development for Reading PDF. I have
I am facing some problem in generating oauth_signature for flickr api. Can you please
I am facing some problem with use of operator == in the following c++
i am facing some problem with files with huge data. i need to skip
I am getting a value through Query string but facing some problem in printing
Kind of a silly problem I'm facing here... Basically I'm in a For-loop and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.