本文整理汇总了VB.NET中System.Web.HttpResponse.SubStatusCode属性的典型用法代码示例。如果您正苦于以下问题:VB.NET HttpResponse.SubStatusCode属性的具体用法?VB.NET HttpResponse.SubStatusCode怎么用?VB.NET HttpResponse.SubStatusCode使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。
在下文中一共展示了HttpResponse.SubStatusCode属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: New
' 导入命名空间
Imports System.Data
Imports System.Web
Imports System.Web.Security
Imports System.Web.UI
' Module that sets Response.SubStatusCode in PostAuthenticateRequest event handler.
Namespace Samples
Public Class ModuleExampleTestVB
Implements IHttpModule
Public Sub New()
' Constructor
End Sub
Public Sub Init(ByVal app As HttpApplication) Implements IHttpModule.Init
AddHandler app.PostAuthenticateRequest, AddressOf Me.PostAuthenticateRequest_Handler
End Sub
Public Sub Dispose() Implements IHttpModule.Dispose
End Sub
Public Sub PostAuthenticateRequest_Handler(ByVal source As Object, ByVal e As EventArgs)
Dim app As HttpApplication = CType(source, HttpApplication)
Dim context As HttpContext = app.Context
' Set a SubStatusCode for Failed Request Tracing in IIS7.
context.Response.SubStatusCode = 99
End Sub
End Class
End Namespace