?
Solved

Razor, WCF,  and ASP

Posted on 2013-01-29
3
Medium Priority
?
850 Views
Last Modified: 2013-02-09
I understand that in an MVC app I would access the WCF  and then pass the object to a view and use razor to display it. But I'm writing a web pages app and I'd like to use Razor and WCF.
I'm trying to figure out where to put the code to define the objects from the WCF and use the it to fill them before I use razor to display them.
Two questions; Am I crazy to try to use razor in a non MVC app? If I'm not crazy, how do I do it?
0
Comment
Question by:trgb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 38832897
Razor is a view engine just like webforms. So the two are alternative of each other hence razor is not supported within webforms

http://stackoverflow.com/questions/5264852/can-we-use-razor-syntax-in-asp-net-webforms-aspx-pages
0
 
LVL 1

Accepted Solution

by:
trgb earned 0 total points
ID: 38851441
Razor is supported in a non MVC app. Any file with either a vbhtml or cshtml extension will be rendered using the Razor engine. But I don't think it's a great idea to mix aspx and vbhtml in the same project.
0
 
LVL 1

Author Closing Comment

by:trgb
ID: 38870798
Tested this out and it worked fine.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question