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
Solved

Razor, WCF,  and ASP

Posted on 2013-01-29
3
815 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
  • 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

856 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