{
FilterContext. Result=new RedirectResult ("/Home/Login ");
} the else
{
FilterContext. Result=new RedirectResult (" ");
}
Code is like that, I which is how to get the page after login authentication, because conditions are not meet I need rice back to a page,
Page does not return an error,
CodePudding user response:
I'm dizzy, no matter before has been an error, now don't complain,If (filterContext. HttpContext. Session (" UserName ")==null | | filterContext. The HttpContext. Session (" UserName "). The ToString ()=="")
{
FilterContext. Result=new RedirectResult ("/Home/Login ");
}
So long as such
CodePudding user response:
Now again in question,Return the View (" Index ");
I return to the Index in the Login page, but it only performs a HTML, what I want is to perform the Index (), to perform Index backend code in executive front
What should I do