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
Ryan Nowak
1886d53d89
Remove [BindProperty] on class
...
This isn't a good fit with consistency with controllers. Discussed with
@DamianEdwards and we agreed to remove this for now and bring it back in
the future if there's a real need for it.
2017-06-28 08:18:42 -07:00
Pranav K
9acfc8d221
Watch _ViewImports outside the pages root for changes
...
Fixes #6428
2017-06-27 09:30:07 -07:00
Pranav K
d1813a7cd7
Normalize paths returned by view location expanders
...
Fixes #6448
2017-06-27 08:48:07 -07:00
Ryan Nowak
0ad9c7d4eb
Making Pages Binding Consistent
...
This changeset reckonciles the binding work we did for pages with
controllers.
A quick summary:
- Moves [BindProperty] to the MVC namespace (#6401 )
- Makes [FromRoute] and friends behave consistently (#6402 )
- Makes [BindProperty] work with controllers (untracked)
2017-06-26 18:11:44 -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
0dfffd45c2
RazorPages page directives missing quotes should alert user
...
Fixes #5868
2017-06-22 15:13:38 -07:00
N. Taylor Mullen
53fb676069
React to new page directive expectations.
...
- This will be reverted once https://github.com/aspnet/Razor/issues/1448 has been completed.
2017-06-20 12:53:23 -07:00
Ryan Nowak
dfe04bc917
Fix #5979 - Remove hardcoding of tempdata for pages
2017-06-12 15:05:36 -07:00
Pranav K
6961cf9211
Cleanup unused precompilation code
2017-06-09 16:45:43 -07:00
Pranav K
8f883e8e13
Use RazorViewAttribute \ RazorPageAttribute for view discovery
2017-06-07 13:49:24 -07:00
Pranav K
628dfc39c1
Remove model type from RazorPageAttribute
2017-06-05 16:07:14 -07:00
Pranav K
20c04d099e
Update to use Razor parser to parse page directive
2017-06-05 14:02:24 -07:00
Ryan Nowak
b796bc0f39
Add Page filters
2017-06-05 08:05:49 -07:00
Pranav K
597a0c9a11
Add support for friendly routes in pages
...
FIxes #6325
2017-05-26 14:29:00 -07:00
Ryan Nowak
688e518991
Add result filters to pages
2017-05-26 12:33:46 -07:00
Ryan Nowak
b7db6dbc8e
Remove pass-through activator for pages
...
This change removes a 'pass through' IRazorPageActivator that we were
using to avoid the default one initializing the Page twice.
The fix is to add an adapter so that the IRazorPage that the RazorView has
isn't the *real* page, it's the adapter. The adapter doesn't have anything
interesting to activate :).
2017-05-26 12:29:10 -07:00
Ryan Brandenburg
03404cd3df
Return to NetStandard
2017-05-25 10:34:16 -07:00
Pranav K
452578e4a8
Revisit the architecture of CompilerCache
...
Fixes #5912
2017-05-25 08:54:15 -07:00
Ryan Nowak
2992f8e38a
Separate PageContext and ViewContext
...
This change decouples PageContext and ViewContext completely.
2017-05-24 16:01:52 -07:00
Pranav K
39f1f5c933
Move Pages filter creation to application model provider
...
Fixes #6198
2017-05-23 11:03:19 -07:00
Nate McMaster
d70bfdd1ea
Upgrade test framework versions and fix test issues
2017-05-15 14:11:27 -07:00
Ryan Nowak
b2d95ffb21
Remove usage of NotFoundProjectItem
...
We're making this type internal in Razor, using a mock here is fine.
Also renamed some types with a generic name. The actual 'default'
RazorProject class lives in Razor and is internal.
2017-05-12 15:55:36 -07:00
Pranav K
1c5e417606
Change TFM to netcoreapp2.0 ( #6234 )
...
* Change TFM to netcoreapp2.0
2017-05-04 18:11:26 -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
Pranav K
649ee4d28d
Add support for page handler to URL generating APIs.
2017-04-24 22:56:58 -07:00
Pranav K
ccdaa5a729
Make /Pages the default root for pages.
...
Fixes #6184
2017-04-24 15:46:32 -07:00
Ryan Nowak
04fd762943
Rename form-action -> handler
2017-04-24 14:15:35 -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
Ryan Brandenburg
908b4c8d62
FormAction from QueryString
2017-04-21 15:04:37 -07:00
Ajay Bhargav Baaskaran
8eac7c2d6c
[ Fixes #6117 ] Added RedirectToPage overloads to Controller
2017-04-21 12:19:35 -07:00
Ryan Brandenburg
5a184df808
Remove Binder from Page and PageModel
2017-04-20 17:54:50 -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 Brandenburg
c56b64fc41
Add factory methods
2017-04-17 16:11:34 -07:00
Pranav K
8ed55107e7
Add support for page precompilation
2017-04-17 10:43:50 -07:00
Pranav K
3474bdf776
RedirectToPage from a form-action handler includes the formaction
...
Fixes #6104
2017-04-12 09:27:08 -07:00
Ryan Brandenburg
59a3aade9b
Fix [TempData] for PageModel's
2017-04-11 16:45:44 -07:00
N. Taylor Mullen
36e272fdc2
React to Microsoft.AspNetCore.Razor.Evolution => Microsoft.AspNetCore.Razor.Language.
...
aspnet/Razor#1169
2017-04-10 10:20:19 -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 Brandenburg
9e8d4db7d8
Move TempDataPropertyProvider into filter
2017-04-05 12:04:02 -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
b22326323a
Add properties to Page and PageModel
...
Fixes #6008
2017-03-28 13:26:38 -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
badb6ce8e5
Remove net451 as a cross-compile target
2017-03-22 06:32:50 -07:00
Jass Bagga
1197657e5b
TempData property attribute
...
Addresses #5600
2017-03-16 16:34:35 -07:00
Nate McMaster
6f7717a381
Unify dependency versions to one file
2017-03-15 16:54:32 -07:00