Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Razor not working

Posted on 2014-04-11
2
Medium Priority
?
72 Views
Last Modified: 2015-01-09
Hello Experts,

Just built a Windows Server 2008 R2 server. Turned on
IIS and installed dot.net framework.

<%@ Page language="C#" %>
<html>
<head>
<title>Testing ASP.NET and C#</title>
<style type="text/css">
body {font-family: arial;
span.Text1 {font-size:24px;}
 </style>
</head>
<body>
<h2>Testing ASP.NET and C#:</h2>

Today's Date:
<%=DateTime.Now.ToString()%>
</body>
</html>

Open in new window


returns

Testing ASP.NET and C#:
Today's Date: 4/11/2014 1:26:49 PM 

Open in new window


So I know asp.net is working.

Was trying to do some Razor

Wrote
<!DOCTYPE html>

<html lang="en">
<head>
     <meta charset="utf-8" />
     <title>Web Pages Demo</title>
</head>
<body>
     <h1>Hello Web Pages</h1> 
     <p>The time is @DateTime.Now</p>
</body>
</html> 

Open in new window


This returns

Hello Web Pages
The time is @DateTime.Now

Open in new window


So the Razor is not working. Is there a library I need to install
or something I need to turn on to get it going? The tutorial says
'Razor has the power of traditional ASP.NET markup, but is easier to learn, and easier to use'. It seems to indicate that it works off of the dot net framework as  but
I am not having any luck.

Thanks.

Allen in Dallas
0
Comment
Question by:Allen Pitts
2 Comments
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 2000 total points
ID: 39994989
...installed dot.net framework.
What version of the .NET Framework?
0
 

Author Comment

by:Allen Pitts
ID: 39995125
Hello Kaufmed,

The Registry Editor says 'Net Framework Setup' v3.5.

(I looked in Control Panel > Programs and Features
and could not find it. Should it not be in there?
It is on my Windows 7 machine. Maybe its different on a
server.)

Allen
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

783 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