Context
Get current AppDomain
AppDomain.CurrentDomain
Get current HttpContext
HttpContext.Current
Get current web request
HttpContext.Current.Request
Get website virtual path
HttpContext.Current.Request.ApplicationPath
Or
HttpRuntime.AppDomainAppVirtualPath
Get website physical path
HttpRuntime.AppDomainAppPath
Or
HttpContext.Current.Request.MapPath(HttpContext.Current.Request.ApplicationPath)
Or
HttpContext.Current.Request.MapPath("~/")
Request
HttpRequest.Params
Gets a combined collection of QueryString, Form, Cookies, and ServerVariables items.
Name-value pairs are added to the collection in the following order:
- Query-string parameters.
- Form fields.
- Cookies.
- Server variables.