用户输入 link 将在用户登录后返回登录,它将转到 link 之前的输入而不是仪表板

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

很抱歉问,但我不知道这个的确切调用是什么。

我有一个场景,例如我粘贴这个 link localhost/Dashboard/Treatment 一旦用户登录,用户将返回到登录页面,它将转到这个 localhost/Dashboard/Treatment 而不是 Main使用 asp.net.

的页面

我只需要这个过程中的确切调用,以便我进行研究。

对不起初学者:)

如果您正在使用登录控件,您可以在代码中使用DestinationPageUrl 属性。

如果您只使用文本框和按钮控件之类的东西,那么在您的 Button_Click 事件中,您可以只使用 Response.Redirect("DestinationHere")

如果您不想更改页面中的任何内容,可以在登录方法中添加 return RedirectToAction({actionName}, {controllerName});