tag:blogger.com,1999:blog-6082652835152798567.post2005903055781056364..comments2024-03-28T21:41:58.974-07:00Comments on Sql server, .net and c# video tutorial: Redirect user to original url after login in asp.net coreUnknownnoreply@blogger.comBlogger4125tag:blogger.com,1999:blog-6082652835152798567.post-89473393969799513762021-09-02T09:26:08.858-07:002021-09-02T09:26:08.858-07:00yes your answer worked!yes your answer worked!nedahttps://www.blogger.com/profile/17787125085969331280noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-66823373263613844382020-07-23T22:46:46.514-07:002020-07-23T22:46:46.514-07:00for some reason asp.net core 3.1 did not add the q...for some reason asp.net core 3.1 did not add the query to the url. Maybe it has something to do with [Rout] attribute. however I found this approach more robust.<br />asp-route-returnurl=Request.Headers["Referer"].ToString();hymmahttp://www.hymma.netnoreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-16749904259840540852019-10-27T12:17:00.533-07:002019-10-27T12:17:00.533-07:00On your form in the login.cshtml, add this: asp-ro...On your form in the login.cshtml, add this: asp-route-returnurl="@Context.Request.Query["ReturnUrl"]";<br /><br />This should work!Anonymoushttps://www.blogger.com/profile/05795894098217503544noreply@blogger.comtag:blogger.com,1999:blog-6082652835152798567.post-48469251097451240782019-07-20T08:31:33.469-07:002019-07-20T08:31:33.469-07:00on http post returnUrl parameter is null, also que...on http post returnUrl parameter is null, also querystring is empty. What did I miss?Anonymoushttps://www.blogger.com/profile/08333406506540775190noreply@blogger.com