Reputation: 13
i have a asp.net webapplication (VS2010, C#) and it aspx page has webmethod that are used for AJAX call (all is fine here).
But i need to use this webmethod (GetEmployeeDetails) outside the asp.net application - say, i need to use this as webservice from another client application - is this possible??
My current webmethod code in .aspx.cs page is :-
:
using System.Web.Services;
:
public partial class EmployeeManagement_ViewLeaveList : System.Web.UI.Page
{
[WebMethod]
public static Object GetEmployeeDetails(int iEmpID)
{
:
:
return obj;
}
}
Upvotes: 0
Views: 394
Reputation: 6664
the service will be be exposed as
\EmployeeManagement_ViewLeaveList.aspx\GetEmployeeDetails
You can use this to be called by other pages. However it is recommended to use separate service instead of this.
Upvotes: 1