-
-
Notifications
You must be signed in to change notification settings - Fork 10
Web context
Alexanderius edited this page Jul 3, 2025
·
3 revisions
With the WebContext
class, you can access raw Microsoft.AspNetCore.Http
HttpContext
context classes and some current request data:
-
Route
- current website route, for example: "/" or "/user/delete/15" -
SiteUrl
- current site URL, for example:http://mysite.com
orhttp://localhost/mysite/
-
VirtualPath
- current site virtual path, for example:/mysite
, if the current site is placed in a virtual directory:http://localhost/mysite/
-
Context
-HttpContext
context -
Request
-HttpRequest
-
Response
-HttpResponse
-
Query
-IQueryCollection
which contains the parsed query string from the current request -
Form
-IFormCollection
which contains parsed HTTP POST form data from the current request -
IsAjax
- property which indicates whether the current request is an AJAX request -
IsAuthenticated
- gets a value indicating whether the current request context user is not null and is authenticated -
RequestBody
- property which contains the request body as a string -
ReadFormAsync
- method which should be called beforeForm
property access; otherwise,Form
will be loaded synchronously -
ReadRequestBodyAsync
- method which should be called beforeRequestBody
property access; otherwise,RequestBody
will be loaded synchronously
- Getting Started
- Main Simplify.Web principles
- Simplify.Web controllers
- Simplify.Web views
- Simplify.Web templates
- Simplify.Web configuration
- Templates variables
- Static content
- Template factory
- Data collector
- String table
- File reader
- Web context
- Environment
- Dynamic environment
- Language manager
- Redirector
- HTML