You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 14, 2018. It is now read-only.
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace WebApplication5.Pages
{
public class TestPage2Model : PageModel
{
public string Test { get; set; } = "DefaultHandler";
public IActionResult OnPost()
{
return RedirectToPage("/TestPage2", "Foo");
}
public void OnGetFoo()
{
Test = "FooHandler";
}
}
}
To reproduce this issue, take the following steps:
Ensure the files listed above are in your MVC 2.0.0-preview2 project.
Run the project and navigate to /TestPage
Expected Behavior:
/TestPage should redirect to /TestPage2/Foo, and the response body should contain "FooHandler".
Actual Behavior:
/TestPage redirects to just /TestPage, and the response body contains "DefaultHandler".
Note that if you submit the form on /TestPage2, the TestPage2.OnPost() handler is invoked and RedirectToPage("/TestPage2", "Foo") successfully redirects to /TestPage2/Foo which contains "FooHandler" as expected. The TestPage2Foo link also points to /TestPage2/Foo.
The text was updated successfully, but these errors were encountered:
/Pages/TestPage.cshtml
/Pages/TestPage2.cshtml.cs
/Pages/TestPage2.cshtml
To reproduce this issue, take the following steps:
Expected Behavior:
/TestPage should redirect to /TestPage2/Foo, and the response body should contain "FooHandler".
Actual Behavior:
/TestPage redirects to just /TestPage, and the response body contains "DefaultHandler".
Note that if you submit the form on /TestPage2, the TestPage2.OnPost() handler is invoked and RedirectToPage("/TestPage2", "Foo") successfully redirects to /TestPage2/Foo which contains "FooHandler" as expected. The TestPage2Foo link also points to /TestPage2/Foo.
The text was updated successfully, but these errors were encountered: