Tuesday, October 23, 2007

Ajax (2.1)


<%@ WebService Language="C#" Class="AspNetAjaxOverview.EmployeeService" %>

using System;

using System.Web;

using System.Web.Services;

using System.Web.Services.Protocols;

using System.Web.Script.Services;

namespace AspNetAjaxOverview

{

[WebService(Namespace = "http://tempuri.org/")]

[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]

[ScriptService]

public class EmployeeService : System.Web.Services.WebService

{

[WebMethod]

[ScriptMethod]

public Employee GetEmployee(string firstName, string lastName, string title)

{

return new Employee(firstName, lastName, title);

}

}

}

blog comments powered by Disqus