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");
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-05-19 00:58:39 +0000
Seen: 15 times
Last updated: May 19 '23
How can I make the html anchor link jump further?
Is it possible to link a single K8s serviceAccount with multiple aws IAM roles?
What is the process to download Aspentech Infoplus 21 using R?
Is it necessary to incorporate <link rel="icon" href="favicon.ico" type="image/x-icon" />?
How can data corruption occur when attempting to change a segment of a link in an Excel file?
How to ensure a page break when creating Velocity HTML resumes?
How can I prevent the LeafletJS page from jumping when a layer is clicked?