Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Layout set from base RazorPage is overwritten #3745

Closed
sebastienros opened this issue Dec 11, 2015 · 1 comment
Closed

Layout set from base RazorPage is overwritten #3745

sebastienros opened this issue Dec 11, 2015 · 1 comment
Assignees
Milestone

Comments

@sebastienros
Copy link
Member

When using a custom RazorPage base class which assigns a default Layout value for instance in its constructor, it will be overwritten by null when there are no ViewStart available or when no ViewStart is defining a Layout, hence losing the default Layout value.

The code here https://github.com/aspnet/Mvc/blob/dev/src/Microsoft.AspNet.Mvc.Razor/RazorView.cs#L174 should not overwrite the RazorPage.Layout if layout is null.

The view is executed after this step, so if is not impacted by this change and will always win which is expected.

@Eilon Eilon added this to the 6.0.0-rc2 milestone Dec 12, 2015
dougbu added a commit that referenced this issue Dec 15, 2015
@dougbu
Copy link
Member

dougbu commented Dec 15, 2015

1b7e672

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants