asp.net core get previouse url

44

how to get previous page url aspnet core -

public async Task<IActionResult> Edit(int? id)
{     
     ...
     ... 
     ViewBag.returnUrl = Request.Headers["Referer"].ToString();
     return View(customer);
}

asp.net core get previouse url -

public IActionResult SomeAction()
{
    return Redirect(Request.GetTypedHeaders().Referer.ToString());
}

Comments

Submit
0 Comments