code_junkie

Should I be calling each of my MVC views Index.aspx

Nov 13th, 2011
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. public class ProductsController : Controller
  2. {
  3. public ActionResult Index()
  4. {
  5. return View(); // looks for Index.aspx in Products directory
  6. }
  7. }
  8.  
  9. public class ProductsController : Controller
  10. {
  11. public ActionResult Index() // my default routing goes to Index (from sample project)
  12. {
  13. return View("Products");
  14. }
  15. }
Add Comment
Please, Sign In to add comment