XCST web pages for ASP.NET Core
This repository provides integration of XCST with ASP.NET Core for web application development. It includes a set of extension instructions known as the "application extension" based on the HTML helpers from ASP.NET MVC.
See the project home for more information.
| Package | Targets |
|---|---|
| Xcst.AspNetCore Runtime |
.NET 8 |
| Xcst.AspNetCore.Extension Compiler extension |
.NET 7 |
The documentation can be found at the project home.
v2 is the main branch for major version 2. See v1 for version 1 (no longer maintained).
Support for ASP.NET 4 (.NET Framework) was dropped in v2, focusing on ASP.NET Core going forward. As a consequence, the number of NuGet packages was reduced from six to two.
The runtime on v2 is much more integrated with ASP.NET Core. Functionality that was previously copied from ASP.NET MVC 5 such as model metadata, model binding, model validation, anti-forgery, etc. is now reused from ASP.NET Core.
The extension on v2 can generate code for runtime v1 or v2 (the default). This not only accounts for runtime API changes, but the extension instructions and attributes also. For example, if v2 removes an attribute, it will be available if you target v1. On the other hand, new instructions and attributes on v2 are not supported when targeting v1. To put it simply, the extension is backwards compatible, but you must explicitly target v1. You are therefore encouraged to use the v2 extension and XCST's v2 compiler to maintain your legacy v1 apps.
**: breaking change
- Sequence constructor for HTML instructions (also this)
- Removed 'attributes' attribute from HTML instructions (can now use
c:attribute) ** - 'id' attribute for HTML instructions
- 'hidden' attribute for HTML instructions
a:fieldsetinstruction- Keeping track of form method to use appropriate culture (invariant for GET requests) and including
__Invarianthidden field for invariant input types ** a:selecta:input,a:textareaa:editor,a:display- Removed 'autofocus', 'disabled' and 'readonly' from
a:editorand 'attributes' froma:editoranda:display** - Ignoring Html5DateRenderingMode (and removed) **
- Text-only sequence constructor for
a:with-options/a:option** - Removed default editor CSS classes **
- Not grouping into fieldset in Object templates **
- New layout for Object templates (one "row" per member) **
- DateOnly and TimeOnly editor templates
- Week editor template
- Month editor and display template
- Multiple file upload
- Removed 'autofocus', 'disabled' and 'readonly' from
a:model- LabelCssClass config option
- Replaced 'inherits' and 'model' directives with 'inherits' and 'a:model-type' attributes **
- 'a:slug' attribute for
c:moduleandc:package
The runtime has lots of changes, including renamed namespaces and moved types. These are the most notable changes:
Url.Absolute()method- Merged TemplateInfo into ViewContext **
- Removed TempData **
- Removed ViewData (and ViewBag) **
- Renamed XcstPage.Context to HttpContext **
The application extension schema is written in Relax NG and converted to XSD using Trang, which requires Java.