本文整理匯總了VB.NET中System.Web.IHttpHandler.IsReusable屬性的典型用法代碼示例。如果您正苦於以下問題:VB.NET IHttpHandler.IsReusable屬性的具體用法?VB.NET IHttpHandler.IsReusable怎麽用?VB.NET IHttpHandler.IsReusable使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。
在下文中一共展示了IHttpHandler.IsReusable屬性的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"/>