Solved

Razor, WCF,  and ASP

Posted on 2013-01-29
3
791 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
Comment Utility
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
Comment Utility
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
Comment Utility
Tested this out and it worked fine.
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

728 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now