Posted By

miziomon on 01/12/07


Tagged

VBNet aspnet HttpContext


Versions (?)


Advertising

Website Promotion DIRECTORY is a crucial factor for all websites that need to gain better organic search engine rankings and increase website traffic.
Submitting your website as part of your Web Promotion strategy to our SEO friendly and high traffic Business Directory for review is an excellent way to gain a valuable backlink and increase your websites visibility online.

Submit Site


HttpContext in external class


Published in: VB.NET 






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

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

Expand | Embed | Plain Text
  1. Imports system.Web
  2. Public Class log
  3. Shared Sub PrintQueryString()
  4. ' usage: lib.PrintQueryString()
  5. Dim Server As Web.HttpServerUtility = Web.HttpContext.Current.Server
  6. Dim Response As Web.HttpResponse = Web.HttpContext.Current.Response
  7. Dim Request As Web.HttpRequest = Web.HttpContext.Current.Request
  8. Dim QueryString As System.Collections.Specialized.NameValueCollection = Request.QueryString
  9. Dim Param As String
  10. For Each Param In QueryString
  11. Response.write("param name: " & Param )
  12. Response.write("<br>")
  13. Response.write("param value: " & QueryString(Param) )
  14. Response.write("<br>")
  15. Next
  16. end Sub
  17. end Class

Report this snippet 

You need to login to post a comment.