Solved

Razor not working

Posted on 2014-04-11
2
65 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
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL Exceptions 3 43
Javascript alert is skipped before a Response.Redirect is executed in vb.net asp.net 9 46
When should I use a controller? 3 34
mail.To.Add 5 25
This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
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…

813 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

16 Experts available now in Live!

Get 1:1 Help Now