HelloWorld HttpHandler (VB) : HTTP Handlers « Development « ASP.NET Tutorial






File: HelloWorldHttpHandler.ashx

<%@ WebHandler Language="VB" Class="HelloWorldHandler" %>

imports System
imports System.Web

public Class HelloWorldHandler
    Implements IHttpHandler

    Sub ProcessRequest(context As HttpContext) Implements IHttpHandler.ProcessRequest
        Dim Request As HttpRequest = context.Request
        Dim Response As HttpResponse = context.Response

        Response.Write("<html>")
        Response.Write("<body>")
        Response.Write("   <h1> Hello " + Request.QueryString("Name") + "</h1>")
        Response.Write("</body>")
        Response.Write("</html>")
    End Sub

    Public ReadOnly Property IsReusable As Boolean Implements IHttpHandler.IsReusable
        Get
          return true
        End Get
    End Property
End Class








9.24.HTTP Handlers
9.24.1.Creating HTTP Handlers
9.24.2.Creating a Generic Handler
9.24.3.HelloWorld HttpHandler (VB)
9.24.4.Implementing the IHttpHandler Interface
9.24.5.RSS Handler
9.24.6.Creating a Custom HTTP Handler
9.24.7.Log user in HttpModule
9.24.8.Source viewer Http Handler