Advertisement
Guest User

return url asp.net mvc

a guest
Mar 25th, 2013
8,955
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.33 KB | None | 0 0
  1. if (Url.IsLocalUrl(returnUrl) && returnUrl.Length > 1 && returnUrl.StartsWith("/")
  2.                         && !returnUrl.StartsWith("//") && !returnUrl.StartsWith("/\\"))
  3.                     {
  4.                         return Redirect(returnUrl);
  5.                     }
  6.                     return RedirectToAction("Index", "Home");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement