Typical "how do I?" - use my own controllers/views
I am TOTALLY new to umbraco and unfortunately been thrown into the deep end to try and get this working.
So, I have my own existing MVC site. A simple site with a controller called "MyAddressController" with its view and model.
The view itself show data from the model but also has a JQuery AJAX call to get data from the controller. This works fine.
I now installed umbraco 7.0.3 in VS2012 using the Nugut system. I am using MVC4 C#.
I setup Umbraco using all defaults and using an empty SQL Server DB. All is fine.
Now, the question is... how the heck can I go to my view? Right now I get a page could not be found where as before installing Umbraco, it was working fine.
I know Umbraco takes over the routing.
Currently as it stands, I have an MVC project in a solution, I installed Umbraco 7.0.3 using the Nuget package. Now what?
I want to be able to show the views as before OR within Umbraco. At the same time I don't really want all the AJAX calls to break.
can someone kindly help me? I'm having a hard time trying to understand.
I found using MVC areas for custom controllers and views easy and clean. You will have to register the area though using the application start up event.
Typical "how do I?" - use my own controllers/views
I am TOTALLY new to umbraco and unfortunately been thrown into the deep end to try and get this working.
So, I have my own existing MVC site. A simple site with a controller called "MyAddressController" with its view and model.
The view itself show data from the model but also has a JQuery AJAX call to get data from the controller. This works fine.
I now installed umbraco 7.0.3 in VS2012 using the Nugut system. I am using MVC4 C#.
I setup Umbraco using all defaults and using an empty SQL Server DB. All is fine.
Now, the question is... how the heck can I go to my view? Right now I get a page could not be found where as before installing Umbraco, it was working fine.
I know Umbraco takes over the routing.
Currently as it stands, I have an MVC project in a solution, I installed Umbraco 7.0.3 using the Nuget package. Now what?
I want to be able to show the views as before OR within Umbraco. At the same time I don't really want all the AJAX calls to break.
can someone kindly help me? I'm having a hard time trying to understand.
thank you.
Hi Ahmed
This documentation about custom routes and custom controllers might help:
http://our.umbraco.org/documentation/Reference/Mvc/custom-routes
http://our.umbraco.org/documentation/Reference/Mvc/custom-controllers
Here is also a blog post from yesterday, with an example of how to use custom routes and custom controllers.
http://umbraco.com/follow-us/blog-archive/2014/1/27/a-practical-example-of-route-hijacking-in-umbraco.aspx
/Dennis
Hello,
Dennis his posts are a good start. If you want to know more about MVC and Umbraco check the Hybrid Framework.
Jeroen
I found using MVC areas for custom controllers and views easy and clean. You will have to register the area though using the application start up event.
is working on a reply...