Click here to Skip to main content
15,392,858 members
Please Sign up or sign in to vote.
1.80/5 (2 votes)
See more:
I have 2 projects names ClientA and ClientB and a WCF Service.

I have a button, and Textbox in ClientA Project.

Here is the code for Form in ClientA Project.

C#
public partial class Form2 : Form
    {
        public Form()
        {
            InitializeComponent();
        }

        public void btnSend_Click(object sender, EventArgs e)
        {
            ServiceReference.Service1Client client = new ServiceReference.Service1Client();
           string returnString1;
            returnString1 = client.GetData(txtbxForm.Text);
            
        }
    }


I have a label in form1 in Client B.

Now I was wondering what I need to add in form1(ClientB Application), so that it displays the text. (text will be sent from clientA to WCF Service.)

What I have tried:

Please give me any idea..or tell me if i am doing anything wrong..!!
Posted
Updated 17-May-16 2:49am
v3
Comments
Rocker-Star 16-May-16 17:19pm
   
I am not sure why a server is needed here, anyways I would go for the same implementation as btnSend_Click() on the server application as well . Definitely you would expect an event for the server form to show, trap that event and implement btnSend_Click().

Hope this helps !!

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