Node is saved as draft in My Content >> Draft
-
Razor Engine in MVC
While working with MVC you dont see # tags which denotes aspx engine you will always see @ which denotes the razor engine.
So writing HTML in this engine is different as compared to aspx engine
@model MVC_Demo.Models.EmployeeModel
@{
ViewBag.Title = "RegisterEmployeeDetails";
}
<h2>RegisterEmployeeDetails</h2>
<div>
<h4>EmployeeModel</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.FirstName)
</dt>
<dd>
@Html.DisplayFor(model => model.FirstName)
</dd>
<dt>
@Html.DisplayNameFor(model => model.MiddleName)
</dt>
<dd>
@Html.DisplayFor(model => model.MiddleName)
</dd>
<dt>
@Html.DisplayNameFor(model => model.LastName)
</dt>
<dd>
@Html.DisplayFor(model => model.LastName)
</dd>
<dt>
@Html.DisplayNameFor(model => model.PhoneNo)
</dt>
<dd>
@Html.DisplayFor(model => model.PhoneNo)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Address)
</dt>
<dd>
@Html.DisplayFor(model => model.Address)
</dd>
</dl>
</div>
<p>
@Html.ActionLink("Edit", "Edit", new { /* id = Model.PrimaryKey */ }) |
@Html.ActionLink("Back to List", "Index")
</p>
Here you can see in HTML that for labels we are writing Label DisplayFor
0 Comment(s)