Re: How ASP.NET MVC Works
Quote:
When he says, "if you go to '/Zoo/LookAtTheMonkey'..." go to it how?
by using your web browser... it should be something along the lines of http://yourservername/Zoo/LookAtTheMonkey ...
as shown here in their example online: http://www.howmvcworks.net/Zoo/LookAtTheMonkey <-- how they "went to /Zoo/LookAtTheMonkey"?
-tg
Re: How ASP.NET MVC Works
One would think so. But that is exactly what I am trying and I am getting resource or dependency not found. If I try http://localhost:nnnnn/Zoo/LookAtTheMonkey.aspx or http://localhost:nnnnn/Views/Zoo/LookAtTheMonkey.aspx -- Oh, I needed to leave off the .aspx extension. This worked: http://localhost:nnnnn/Zoo/LookAtTheMonkey!!! Thanks for the prompt to keep trying.
Re: How ASP.NET MVC Works
yeah... it says to go to zoo/lookatthemoneky ... not lookatthemonkey.aspx ... I didn't realize that's what you were doing. :p
-tg
Re: How ASP.NET MVC Works
Going to "/Zoo/LookAtTheMonkey" means that you want to call the LookAtTheMonkey action inside the Zoo controller. If you look in your global.asax file, you will see the default route mapping defined in RegisterRoutes() which is "{controller}/{action}/{id}" with the "id" paramater being optional. The great thing about this is you can specify any type for the "id" parameter (if it has a string representation) like string/int/Guid/etc. when you create your action methods.
That site also appears to be quite old, but is still useful for teaching the MVC concepts.
If you are starting out on MVC, I would recommend using the razor view engine instead of the "aspx" view engine. It's got a much cleaner/nicer layout than "aspx" views.
Re: How ASP.NET MVC Works
Quote:
Originally Posted by
tr333
If you are starting out on MVC, I would recommend using the
razor view engine instead of the "aspx" view engine. It's got a much cleaner/nicer layout than "aspx" views.
I would have to agree with this. You will find it quite jarring to start with, but it is quickly becoming the default View Engine.
Gary