本文整理汇总了VB.NET中System.Web.IHttpHandler.ProcessRequest方法的典型用法代码示例。如果您正苦于以下问题:VB.NET IHttpHandler.ProcessRequest方法的具体用法?VB.NET IHttpHandler.ProcessRequest怎么用?VB.NET IHttpHandler.ProcessRequest使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。
在下文中一共展示了IHttpHandler.ProcessRequest方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: ProcessRequest
' Name this Visual Basic file HandlerTest.vb and compile it with the
' command line: vbc /target:library /r:System.Web.dll HandlerTest.vb.
' Copy HandlerTest.dll to your \bin directory.
Imports System.Web
Namespace HandlerExample
Public Class MyHttpHandler
Implements IHttpHandler
' Override the ProcessRequest method.
Public Sub ProcessRequest(context As HttpContext) _
Implements IHttpHandler.ProcessRequest
context.Response.Write("<H1>This is an HttpHandler Test.</H1>")
context.Response.Write("<p>Your Browser:</p>")
context.Response.Write("Type: " & context.Request.Browser.Type & "<br>")
context.Response.Write("Version: " & context.Request.Browser.Version)
End Sub
' Override the IsReusable property.
Public ReadOnly Property IsReusable() As Boolean _
Implements IHttpHandler.IsReusable
Get
Return True
End Get
End Property
End Class
End Namespace
'______________________________________________________________
'
' To use this handler, include the following lines in a
' Web.config file (be sure to remove the comment markers).
'
' <add verb="*" path="handler.aspx" type="HandlerExample.MyHttpHandler,HandlerTest"/>