Try my app Expense Manager @ google play and amazon store.

Tuesday, December 18, 2012

Consume ASMX web Service in ASP.NET 4.0

In last tutorial, we learn How to Create ASMX web Service in ASP.NET 4.0. This tutorial guides how to consume it.
  • Add new aspx page. Right click on Website and click 'Add New Item'. A new window will appear. asmx web service

  • Select 'Web Form' and name it according to your choice. asmx web service

  • Create new object of web service by writing following code:
MyFirstWebService svc = new MyFirstWebService();
  • Call web service method by writing following code:
svc.CallmyName("Waqas Ali"); asmx web service

No comments:

Post a Comment

Follow by Email

Google+ Badge