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

In a Razor page returning View from OnGet results in a compile error. #5802

Closed
NTaylorMullen opened this issue Feb 14, 2017 · 2 comments
Closed

Comments

@NTaylorMullen
Copy link
Contributor

Having:

@page

@functions {
    public IActionResult OnGet()
    {
        Message = "From OnGet";

        return View();
    }
    public string Message { get; set; } = "Default";
}
<p>The message: @Message</p>

Results in a compile error:
image

@ryanbrandenburg
Copy link
Contributor

This seems to have been fixed by e11e6b3. I'll go ahead and add a functional test like he did for Redirect though.

@rynowak
Copy link
Member

rynowak commented Mar 4, 2017

Alright let's go 👍

image

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

4 participants