Documentation for: ASP.NET Ajax Version 1.0

This documentation is for a previous version. For the current released version, see the ASP.NET Ajax documentation on MSDN.








Sys.Net.ServerTime Sample


<%@ WebService Language="VB" Class="Samples.AspNet.ServerTime" %>

Imports System.Web
Imports System.Web.Services
Imports System.Xml
Imports System.Web.Services.Protocols
Imports System.Web.Script.Services

Namespace Samples.AspNet
    <WebService(Namespace:="")> _
    <WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
    <ScriptService()> _
    Public Class ServerTime
        Inherits System.Web.Services.WebService
        <WebMethod()> _
        Public Function GetServerTime() As String
            Return String.Format("The current time is {0}.", _
        End Function
    End Class

End Namespace