我尝试在以下通用处理程序中使用 ASP.Net,但我在Page.RouteData
Reference to a non-shared member requires an object reference
我做错了什么?
<%@ WebHandler Language="VB" Class="MainHandler" %>
Imports System
Imports System.Web
Imports System.Xml
Public Class MainHandler : Implements IHttpHandler, System.Web.SessionState.IRequiresSessionState
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
Dim lng As String = Page.RouteData.Values("locale")
End Sub
Public ReadOnly Property IsReusable() As Boolean Implements IHttpHandler.IsReusable
Get
Return False
End Get
End Property
End Class
对于任何答案,请记住我是新手,我的语言是 VB.NET :) 提前谢谢你。