[SOLVED] user input link will go back to login once the user logged in it will go to the link earlier input instead of dashboard

Issue

Sorry to ask but I don’t what is the exact call on this.

I have a scenario for example I paste this link localhost/Dashboard/Treatment the user will go back to the login page once the user logged it will go to this localhost/Dashboard/Treatment instead of Main Page using asp.net.

I need is only the exactly the call on this process so that I will do the research.

Sorry beginner 🙂

Solution

If you are using login control, you can use DestinationPageUrl property in your code.

If you just use things like text boxes and button controls, then in your Button_Click event, you can just use Response.Redirect("DestinationHere").

If you don’t want change anything in your page, you can add return RedirectToAction({actionName}, {controllerName}); in your login method.

Answered By – Xinran Shen

Answer Checked By – Terry (BugsFixing Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *