Working with existing VS.Net Project

Topics: General, Installing Orchard
Jun 26, 2012 at 11:51 AM

Our current website is a VS .NET website that makes use of Data Access/Grid Views, etc., also the .Net Security Role Model system to allow user to login and view their statements.

I don't want to have to rewrite the entire site (that would be painful), all that I want is to manage the TextPage content e.g. "About Us" page, "Area Guides", etc.

Is there a way I can continue to use my existing asp.net pages and just get Orchard to manage my TextPages?  

How can I work with both Visual Studio to manage the "complex" pages and get orchard to just manage the "content" pages?

Or is there a better way to do this.  I've been racking my brain for a simple method to manage the content pages of the website, whilst still being able to programme the other pages in VS .NET?

I guess one way could be to add the Orchard page to the <Content> section of my existing MasterTemplate, for each of the TextPages?  Is this a good idea?

Developer
Jun 26, 2012 at 2:00 PM

I don't think you can inject an Orchard page straight into your <Content> section, unless of course you make a web request to the Orchard application in the background (using the WebClient). Then you could inject the returned HTML into <Content>.
Or a similar approach could be to create a custom module in Orchard that exposes a controller which you invoke from your ASP.Net application. The controller would have an action that returns page information in JSON format. That way you could retrieve all of the parts that a Page consists of, and render it in any way that is suitable to your application.

Another approach could be to read content information directly from the Orchard database, although that is probably not very practical and would require a lot of code to assemble whole content items from the various tables.

Is your existing application written on WebForms or MVC? If the latter, it may be interesting to convert it into an Orchard module. Note that with Orchard development you use Visual Studio as well.