1 | initial version |
You can redirect to a page located in a different folder using razorpages by:
For example, if you have a page named "Index" in a folder named "Admin", you can redirect to it using the following code:
return RedirectToPage("/Admin/Index");
Note that the leading slash ("/") indicates the root folder of the application, and the folder and page name are separated by a forward slash ("/").
For example, if you have a page named "Index" in a folder named "Admin", you can generate a link to the page using the following code:
And then use the link as the target for the redirect:
return Redirect("/Admin/Index");