Return to Snippet

Revision: 2184
at January 12, 2007 07:46 by miziomon


Updated Code
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

Revision: 2183
at January 12, 2007 01:07 by miziomon


Updated Code
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("Nome parametro: " & Param )
             Response.write("Vaore parametro: " & QueryString(Param ))
        Next
    end Sub
end Class

Revision: 2182
at January 12, 2007 00:58 by miziomon


Initial Code
Imports system.Web
Public Class log

    Shared Sub StampaQueryString()

        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("Nome parametro: " & Param )
             Response.write("Vaore parametro: " & QueryString(Param ))
        Next

    end Sub

end Class

Initial URL
http://maurizio.mavida.com/2007/01/12/usare-httpcontext-fuori-da-una-pagina-aspx/

Initial Description
Usage of Server, Response and Request object with HttpContext declaration from external class

Initial Title
HttpContext in external class

Initial Tags
aspnet

Initial Language
VB.NET