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.
- Select 'Web Form' and name it according to your choice.
- 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");
See Also
No comments:
Post a Comment