I have a form as
When accessing in C# code-behind via
May be you can try redirecttoaction
Here is sample
public ActionResult LogOff() { FormsAuth.SignOut(); return RedirectToAction("Index", "Home"); }
Hope this helps.