title: What am I doing wrong converting Razor to ASPX?
body: <p>i am doing a simple (I think) tutorial for MVC.  The only issue is the tutorial uses <code>Razor</code> and I need to use <code>ASPX</code>.  Job I'm looking at uses it.</p>
  
  <p>I have spent hours looking over the internet for possibilities but I am still getting this error:</p>
  
  <blockquote>
    <p>Compilation Error</p>
    
    <p>Description: An error occurred during the compilation of a resource required to 
    service this request. Please review the following
    specific error details and modify your source code appropriately.<br>
    Compiler Error Message: CS1061: 'object' does not contain a definition
    for 'Name' and no extension method 'Name' accepting a first argument
    of type 'object' could be found (are you missing a using directive or
    an assembly reference?)   Source Error:  </p>
    
    <p>Line 12:<br>
    Line 13:     <br>
    Line 14:     Restaurant: &lt;%: Model.Name %><br>
    Line 15:     Rating:  &lt;%: Model.Rating %><br>
    Line 16: </p>
  </blockquote>
  
  <p><strong>The controller code is:</strong></p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Web.Mvc;
  using EdeToFood.Models;
  
  namespace EdeToFood.Controllers
  {
      public class HomeController : Controller
      {
          public ActionResult Index()
          {
              ViewBag.Message = "Welcome to ASP.NET MVC!";
  
              var model = new RestaurantReview()
              {
                  Name = "Tersiguil's",
                  Rating = 9
              };
  
              return View(model);
          }
  
          public ActionResult About()
          {
              ViewBag.Location = "Maryland, USA";
              return View();
          }
      }
  }
  </code></pre>
  
  <p><strong>The ASPX is:</strong></p>
  
  <pre><code>%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %&gt;
  
  &lt;asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server"&gt;
      Home Page
  &lt;/asp:Content&gt;
  
  &lt;asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"&gt;
      &lt;h2&gt;&lt;%: ViewBag.Message %&gt;&lt;/h2&gt;
      &lt;p&gt;
          To learn more about ASP.NET MVC visit &lt;a href="http://asp.net/mvc" title="ASP.NET MVC Website"&gt;http://asp.net/mvc&lt;/a&gt;.
      &lt;/p&gt;
  
      &lt;div &gt;
      Restaurant:  &lt;%: Model.Name %&gt;
      Rating:  &lt;%: Model.Rating %&gt;
  
      &lt;/div&gt;
  &lt;/asp:Content&gt;
  </code></pre>