Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Razor not working

Posted on 2014-04-11
2
Medium Priority
?
71 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
[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 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

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

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 …
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…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

670 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