<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<PopulatingDDLusingEF.ViewModels.IndexViewModel>" %>
In Razor you should use @Model
keyword
@model PopulatingDDLusingEF.ViewModels.IndexViewModel
@{
ViewBag.Title = "Result";
Layout = "~/Views/Shared/Site.Master";
}
This is an example how to convert ASP syntax to razor syntax which i got from Marcind's post
<% if(someCondition) { %>
<ol>
<% foreach(var item in Model) { %>
<li><%: item.ToString() %></li>
<% } %>
</ol>
<% } %>
Can be expressed as follows in Razor:
@if(someCondition) {
<ol>
@foreach(var item in Model) {
<li>@item.ToString()</li>
}
</ol>
}
Also check this for a quick useful Razor reference