c# - How to redirect to a asp.net core razor page (no routes) -




here have razor cs page:

public iactionresult onpost(){   if (!modelstate.isvalid) {     return page();    }       return redirecttopage('pages/index.cshtml');    } 

and cshtml page:

@page @using razorpages  @model indexmodel <form method="post">   <input type="submit" id="submit"> </form> 

i want redirect same page on form submit keep getting 400 error. possible redirect without using routes , go cshtml file in url?

try in view;

@using (html.beginform()) {    <input type="submit" id="submit"> } 




wiki

Comments

Popular posts from this blog

elasticsearch - what is the equivalent data type for geo_point in hibernate search? -

firebase - How to wait value in Ionic 2 -

Jenkins: find build number for git commit -