Pranav K
b62499e02c
Ensure PageContext.ViewData and ViewContext.ViewData are the same instance
...
Fixes #7675
2018-07-16 11:16:03 -07:00
Pranav K
335500ab0e
Use ModelMetadata from actual types for validation
...
Fixes https://github.com/aspnet/Mvc/issues/7952
2018-07-02 11:23:16 -07:00
Pranav K
287a3c5e69
Allow IgnoreAntiForgeryToken applied on Razor Page models to work
...
Fixes #7795
2018-06-13 11:59:47 -07:00
Kiran Challa
35f7d3f09c
Added tests to verify that RazorPages and FuzzyMatching with Head requests work
2018-05-01 14:01:00 -07:00
Pranav K
5d5222cdd8
Introduce BindPropertiesAttribute
...
* Allow controller and Razor Page models to be annotated with BindPropertiesAttribute
* Disallow BindPropertyAttribute from being declared on types.
* Do not allow arbitrary binding attributes to be applied to Razor Page models.
Fixes #7686
2018-04-20 14:32:14 -07:00
Kiran Challa
faca3da42f
Ensure ViewData is set on PageResult after a handler method executes
...
[Fixes #7665 ] Initializing PageResult.Page as part of result execution breaks Identity UI
2018-04-18 11:44:04 -07:00
Kiran Challa
d5e044f693
[ Fixes #7373 ] Assigning to the context's Result property, when implementing IPageFilter, causes an exception
2018-04-13 15:11:44 -07:00
Pranav K
133dd964ab
Introduce ViewDataAttribute
...
Allow properties on controllers, Razor Page and Razor Page models annotatted with [ViewDataAttribute]
to populate ViewDataDictionary
Fixes https://github.com/aspnet/Mvc/issues/6525
2018-03-30 14:19:52 -07:00
Pranav K
f8e315d03d
CompiledPageRouteModelProvider should de-dup descriptors
...
Fixes #7543
2018-03-28 11:24:49 -07:00
Pranav K
06e40252a0
Add support for top level validation to Razor Pages
2018-02-14 14:39:25 -08:00
Javier Calvarro Nelson
7127bb5dbb
Add DeclaredModelType to Razor pages
...
* This allows razor pages to override their model type with a model that
extends the declared model type through the page application model.
2018-01-25 16:00:54 -08:00
Pranav K
946b64143e
Allow override routes on Pages
...
Fixes #6605
2018-01-12 15:57:13 -08:00
Pranav K
dfa085afaf
Add support for areas to Razor Pages
...
Fixes #6926
2017-12-19 15:03:05 -08:00
Jass Bagga
0bb3f18049
Add support for BadRequest in RazorPages ( #7097 )
...
Addresses #7095
2017-12-01 12:03:24 -08:00
Pranav K
037c1ec47d
Make @inherit + Razor Pages + _ViewImports work
...
Fixes #6769
2017-09-14 12:34:00 -07:00
Pranav K
de38922601
Allow BindPropertyAttribute to be applied on PageModel
...
Fixes #6653
2017-09-12 10:34:19 -07:00
Pranav K
6bf165f22f
Update default Razor search paths to include ~/[PagesRoot]/Shared
...
Fixes #6604
2017-09-11 14:11:39 -07:00
Pranav K
bac68ba3c2
Injecting IViewLocalizer into Razor Page causing IndexOutOfRangeException
...
Fixes #6694
2017-09-06 13:54:38 -07:00
Pranav K
a5b55edb93
Fix filter order ( #6577 )
...
* Fix filter order
2017-07-21 10:50:34 -07:00
Ryan Nowak
579aca0121
Define semantics for pagemodels
...
Fixes #6210
Now a pagemodel requires a [PageModel] somewhere in it's hierarchy. We
don't do a guess at whether or not your model class is a PageModel.
2017-06-29 09:24:57 -07:00
Pranav K
8df3032540
Add support for specifying filters on page models.
...
Fixes #6334
2017-06-28 14:43:02 -07:00
Pranav K
aa5a348385
_ViewStart.cshtml not picked up when added to the root of the app
...
Fixes #6308
2017-06-23 08:25:58 -07:00
Pranav K
c89f0a1e43
Allow AddPageRoute to route to pages root. ( #6412 )
...
* Allow AddPageRoute to route to pages root.
Fixes #6338
2017-06-20 12:33:33 -07:00
Ryan Nowak
c1dd95be2a
Add a test for #6294
...
This case was fixed by 2992f8e - this commit just adds a test to verify
the fix.
2017-05-24 16:53:30 -07:00
N. Taylor Mullen
8bece90c83
Fix asp-page-handler to generate form tags correctly.
...
- Prior to this change using asp-page-handler on its own did not create correct `<form>` elements. There were multiple issues, one as that the `FormTagHelper` would purposefully drop into a no-op code path. Second is the `DefaultHtmlGenerator` didn't call through to the `UrlHelper` correctly.
- Added functional test cases to validate asp-page-handler can live on its own on a form tag. This also included adding a variant where method="post".
- Added a `FormTagHelper` unit test to validate the `PageHandler` property is consumed properly.
#6208
2017-04-27 10:32:04 -07:00
Ryan Nowak
b1b3a816cc
Rename View() to Page()
...
This requires us to introduce another base class between RazorPageBase and
Page - you need this because you aren't allow to have Page.Page().
2017-04-27 09:27:14 -07:00
Ryan Brandenburg
42b988ad88
./ paths relative on page.
2017-04-25 11:57:58 -07:00
Pranav K
649ee4d28d
Add support for page handler to URL generating APIs.
2017-04-24 22:56:58 -07:00
Ryan Nowak
04fd762943
Rename form-action -> handler
2017-04-24 14:15:35 -07:00
Pranav K
ca017eced2
Add page to AnchorTagHelper and FormTagHelper
...
Fixes #6088
2017-04-21 18:12:54 -07:00
Pranav K
f568d3c2bc
Support finding "sibling" pages when using RedirecToPage
...
Fixes #6083
2017-04-21 18:12:52 -07:00
Ryan Nowak
297196baa0
Design updates to handler methods and binding
...
Implements #6091 , #6072 , #6090 , #5927
2017-04-21 17:29:25 -07:00
Pranav K
681b798a2e
RedirectToPage doesn't trim /Index from URL
...
Fixes #6080
2017-04-20 11:15:45 -07:00
Ryan Brandenburg
c9bfd2296d
Parity between Controller and Page/PageModel
2017-04-19 15:02:06 -07:00
Ryan Nowak
a8eb5bee70
Implement view search for pages
...
The View Engine now needs to know about pages :(. This isn't ideal but the
view engine needs to know what set of search paths to use. This was
already hardcoded for controllers vs controllers + areas. It felt right to
further hardcode instead of introduce a wierd abstraction that we only
use.
Additionally pages use a view location expander to implement an ascending
directory search.
2017-04-18 16:11:24 -07:00
Ryan Nowak
ed3aa4d918
Adding functional tests for @namespace
2017-04-14 14:47:29 -07:00
Pranav K
3474bdf776
RedirectToPage from a form-action handler includes the formaction
...
Fixes #6104
2017-04-12 09:27:08 -07:00
Pranav K
1e7972bd8f
Add convenience methods for redirecting from a Razor Page back to itself
...
Fuxes #5953
2017-04-07 10:03:42 -07:00
Ryan Nowak
4032de064e
Removing _PageStart.cshtml
...
Pages now also use _ViewStart.cshtml
Also contains some naming/text cleanup that was missed in the previous
commit.
2017-04-06 08:14:37 -07:00
Ryan Nowak
c6e4609096
Getting rid of _PageImports
...
Pages will just use _ViewImports.
2017-04-06 08:14:37 -07:00
Pranav K
925ad75cdf
Add convenience methods for redirecting to another Razor Page
...
Fixes #5956
2017-04-04 14:36:22 -07:00
Hisham Bin Ateya
fe3d45fad1
Adding AllowAnonymousToPage & AllowAnonymousToFolder
...
Fixes #5884
2017-03-31 20:17:31 -07:00
Pranav K
e7101f248a
Support model binding to Razor Pages properties on page and PageModel classes
...
Fixes #5952
2017-03-24 07:45:19 -07:00
Pranav K
bee1a55cff
Use RazorPagesOptions.RootDirectory when looking for page hierarchies.
...
Fixes #5915
2017-03-14 18:56:50 -07:00
Pranav K
145d27f9b3
Add a PagesOption type that allows configuring the root for Page file discovery
...
Fixes #5785
2017-03-03 17:20:07 -08:00