Solved

Razor not working

Posted on 2014-04-11
2
67 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:9apit
[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 500 total points
ID: 39994989
...installed dot.net framework.
What version of the .NET Framework?
0
 

Author Comment

by:9apit
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

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…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
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…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

749 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