Listato 2. Codice lato server (VB.NET)

'Classe Esempio01.vb
Partial Class Esempio01_VB
  Inherits System.Web.UI.Page

  'Caricamento Pagina
  Protected Sub Esempio_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Esempio.Load
    Ajax.Utility.RegisterTypeForAjax(GetType(Esempio01_VB))
  End Sub

  'Metodo pubblico
  Public Function Concat(ByVal str1 As String, ByVal str2 As String) As String
    Dim Result As String Result = str1 + vbNewLine + str2 + vbNewLine
    Result += "Utente : " + Environment.UserName
    Return Result
  End Function

End Class