I need to access Wcf service methods without adding Service Reference?how to do this?
Step 1:I create a WCF Service.
Step 2:Add Service Reference to my application.
Step 3:And Access the WCF Service methods into app.
like this way,
ServiceReference1.Service1Client obj = new ServiceReference1.Service1Client();
protected void Button1_Click(object sender, EventArgs e)
{
UserDetails userInfo = new UserDetails();
userInfo.UserName = TextBoxUserName.Text;
userInfo.Password = TextBoxPassword.Text;
userInfo.Country = TextBoxCountry.Text;
userInfo.Email = TextBoxEmail.Text;
string result = obj.InsertUserDetails(userInfo);
LabelMessage.Text = result;
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…