Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 9th, 2012  |  syntax: None  |  size: 0.72 KB  |  hits: 16  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Can't find view even though it's there, it's not looking for the correct extension
  2. [HttpGet]
  3.  [ActionName("Unsubscribe")]
  4.  public ActionResult UnsubscribeGet(string maskedId)
  5.  {    
  6.      return View("Unsubscribe", maskedId);
  7.   }
  8.        
  9. routes.MapRoute(
  10.                "", // Route name
  11.                "Unsubscribe/{maskedId}", // URL with parameters
  12.                new { controller = "Account", action = "Unsubscribe" });
  13.        
  14. [HttpGet]
  15. [ActionName("Unsubscribe")]
  16. public ActionResult UnsubscribeGet(string maskedId)
  17. {
  18.     return View("Unsubscribe", new UnsubscribeViewModel { MaskedId = maskedId } );
  19. }
  20.        
  21. protected internal ViewResult View(
  22.     string viewName,
  23.     string masterName
  24. )
  25.        
  26. return View("Unsubscribe", (object) maskedId);