We're a community of 1.1M IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,080,324 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

RenderBody() Error

Hello,

I know nothing about web development or ASP.NET. I started a tutorial tonight that consisted of cutting and pasting code into the editor. Now I am getting an error with the code I have cut and pasted. Does anyone know what is wrong with calling the RenderBody() on line 14?

<!DOCTYPE html>
<html> 
<head> 
<link rel="stylesheet" type="text/css" href="/Shared/Site.css" />
</head>
<body> 

<ul id="menu">
<li><a href="/Default">Home</a></li> 
<li><a href="/About">About</a></li> 
</ul> 

<div id="main"> 
@RenderBody() 
<p>&copy; 2012 W3Schools. All rights reserved.</p> 
</div> 

</body> 
</html>
2
Contributors
1
Reply
7 Minutes
Discussion Span
1 Year Ago
Last Updated
2
Views
coolbeanbob
Junior Poster
188 posts since Oct 2010
Reputation Points: 27
Solved Threads: 1
Skill Endorsements: 0

Beacuse you've posted the cut & paste code so it is better for you to read this MSDN blog post - Creating a Home Page View Using Razor Syntax

__avd
Posting Genius (adatapost)
Moderator
8,737 posts since Oct 2008
Reputation Points: 2,141
Solved Threads: 1,262
Skill Endorsements: 51

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page generated in 0.0549 seconds using 2.69MB