外部类中的HttpContext
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了外部类中的HttpContext相关的知识,希望对你有一定的参考价值。
Usage of Server, Response and Request object with HttpContext declaration from external class
Imports system.Web Public Class log Shared Sub PrintQueryString() ' usage: lib.PrintQueryString() Dim Server As Web.HttpServerUtility = Web.HttpContext.Current.Server Dim Response As Web.HttpResponse = Web.HttpContext.Current.Response Dim Request As Web.HttpRequest = Web.HttpContext.Current.Request Dim QueryString As System.Collections.Specialized.NameValueCollection = Request.QueryString Dim Param As String For Each Param In QueryString Response.write("param name: " & Param ) Response.write("<br>") Response.write("param value: " & QueryString(Param) ) Response.write("<br>") Next end Sub end Class
以上是关于外部类中的HttpContext的主要内容,如果未能解决你的问题,请参考以下文章