<%@ WebService Language="C#" CodeBehind="~/App_Code/Service.cs" Class="Service" %>
File: ~/App_Code/Service.cs
using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
{
public Service () {
}
[WebMethod]
public string HelloWorld() {
return "Hello World. The time is " + DateTime.Now.ToLongTimeString();
}
}
|