views:

34

answers:

1

Hi All,

I have a bunch of Views in a default folder that represent single "static" pages.

Everything works as advertised except i tried adding a new page yesterday.. using the exact same routing syntax and cannot for the life of me get it to work.

here's is an example of a working route:

routes.MapRoute(
            "OurProgram",           // Route name
            "Our_Program",          // URL with parameters
            new { controller = "Default", action = "OurProgram" }  
        );

The filename is OurProgram and hitting http:// localhost/Our_Program/ opens the correct view which resides in the Views/Default folder.

So i added another view into this folder:

Views/Default/BuyNow.aspx and added the route:

routes.MapRoute(
            "BuyNow",                  // Route name
            "Buy_Now",                 // URL with parameters
            new { controller = "Default", action = "BuyNow" }  
        );

And this doesn't open. I have tried the "route debugger http://haacked.com/archive/2008/03/13/url-routing-debugger.aspx" and it correctly identifies the route.

I am at a lose. I have tried re-creating the view.. I am using MVC.Net 2.0 and VS 10.

Any help is appreciated!

+1  A: 

Stab in the dark: Do you have a BuyNow action method in your controller? That's what the new route is trying to call.

Robert Harvey
Duhh. THANKS. No i don't haha. Totally haven't looked at that since i first put together the other routes. I have to wait 8 more minutes before i can mark this as answered. But thanks in advance!
bill