-
-
Notifications
You must be signed in to change notification settings - Fork 10
Web context
Alexanderius edited this page Dec 22, 2019
·
3 revisions
With WebContext class you can access raw Microsoft.AspNetCore.Http HttpContext context classes and some current request data:
-
Route- Current web-site route, for example: "/" or "/user/delete/15" -
SiteUrl- current site URL, for example:http://mysite.comorhttp://localhost/mysite/; -
VirtualPath- current site virtual path, for example:/mysite, if current site is places in virtual directory:http://localhost/mysite/; -
Context-HttpContextcontext; -
Request-HttpRequest; -
Response-HttpResponse; -
Query-IQueryCollectionwhich contains parsed query string from current request; -
Form-IFormCollectionwhich contains parsed HTTP POST form data from current request; -
IsAjax- property which indicates what current request is AJAX request; -
IsAuthenticated- gets a value indicating whether current request context user is not null and is authenticated; -
RequestBody- property which contains request body as a string; -
ReadFormAsync- method which should be called beforeFormproperty access otherwiseFormwill be loaded synchronously; -
ReadRequestBodyAsync- method which should be called beforeRequestBodyproperty access otherwiseRequestBodywill 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