Link to home
Start Free TrialLog in
Avatar of codeJen
codeJen

asked on

converting mvc 1 to mvc 3 using Orchard CMS

Hello Experts.

I am forced to use this CMS, Orchard, and I am not familiar with it at all.  I have an older version of a MVC 1 program that needs to be converted to MVC 3 and use Orchard.

My question is, since all of the views in Orchard CMS have CSHTML extension written in Razor, can I add a module with a ASPX and ASCX pages?  Is it compatible?

My issue is getting the application to see my included files like JQuery scripts, master page and any CSS files.  I can't seem to get the links to work images don't show and the only thing I can come up with is, since Orchard is written with Razor it doesn't like <%%> syntax?

Open for any comments or questions.
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of codeJen
codeJen

ASKER

I have about 14 views.  It's a huge challenge.  :(  I have tried to convert the pages to CSHTML using a convertor tool for Visual Studio 2010 but i think there may be more than just changing the views.  I haven't gotten that far yet but I think my web.config needs to be updated to.  The documentation out there for Orchard is very limited.
Orchard is simple.

Find the links for documentation.
http://docs.orchardproject.net/
Avatar of codeJen

ASKER

Hello Darjimaulik,

I have my module converted now.  It's adding it to Orchard.  So are you saying that Orchard doesn't support ASPX and ASCX pages?

If so, then I guess that answers my question for adding it to Orchard like it is, in MVC3.  What would you suggest to make it work in Orchard then?  Start a new module?  I have read that orchard link a few times.  Orchard has not been easy here for us and I've just begun to learn it.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of codeJen

ASKER

Hello TheLearnedOne,

In converting my MVC1 to 2 and then 3, I found some white papers online with Microsoft that helped me through this one.  At first I tried using a convertor tool and it didn't work very well, so I decided to do it manually.  These white papers were perfect for this.

upgrade MVC1 to 2

upgrade to MVC3 from MVC2

Now that I have it working and converted to MVC3, would it be as simple as packaging it up and adding it to Orchard as a new module?  

I've read the online Orchard docs and really haven't seen a case where someone has documented how to add an exisiting MVC3 project into Orchard using ASPX.  So this is what I am guessing is the next step.  
Package the MVC3 project up.  This is upder Properties and Package/Publish web.  Then once that is created add existing module through the Orchard admin dashboard screen from my PC?  Since the folder structure in Orchard is a bit different I am unsure if this is the correct way and worried I may mess something up since I am new to Orchard.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of codeJen

ASKER

After working with MVC I don't understand why they need to use this Orchard stuff. LOL  Oh well.  Thanks for your input and I did notice in your config file there are some places I need to set up Razor if I did go the route of converting this to use Razor.  Thank you again.
Orchard is a content management application, and is a wrapper around MVC 3; not a replacement for.

Why I Love Orchard CMS
http://paulmason.biz/?p=118

About The Orchard Project
http://orchard.codeplex.com/

Individual .NET-based applications that appeal to end-users , scripters, and developers
A set of re-usable components that makes it easy to build such applications
A vibrant community to help define these applications and extensions
Avatar of codeJen

ASKER

Yes, I have read the docs and understand what Orchard is now.  Thanks.  However my issue is adding a MVC3 project into Orchard.  I have not read anything that tells me how to do this.

Which is why I am asking the experts here.  My issue is that my MVC3 is asp.net and the Orchard is Razor.  My paths to images, java script files and JQuery scripts do not work unless I put the path to my C: drive where the files are located.  Going across 3 enviroments isn't going to work like this.  
To show an example here is how the script is currently and not working:
<link type="text/css" href="<%=Url.Content("~/Content/Site.css")%>" rel="stylesheet" />

Open in new window

This is the only way it will work that I can find so far.
<link type="text/css" href="C:\mywfg\MyWfg.com2\source\Orchard\src\Orchard.Web\Modules\WFG.OnlineProductGuide\Content\Site.css" rel="stylesheet" />

Open in new window


Why does it not work like this? ="<%=Url.Content("~/Content/Site.css")%>"

It works until I add the module in to Orchard, then all of the links break.

If there is anyone that can answer this then you win!  It's been weeks of reading these Orchard docs and I can't find an answer.
Avatar of codeJen

ASKER

Thank you to everyone and their feedback.  I have moved this question to focus more on why my links do not work once added to Orchard.
Hi Codejen,
Where is your Question regarding issue with the Orchard and Links?

I can help you out in Orchard.
Avatar of codeJen

ASKER

Experts Exchange new question started

Here is the new post started.   Thanks