@{
Layout = "~/Views/Shared/_Layout.cshtml";
}
Web Forms view engine example:
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage
Razor view engine example
@model Product[]
Current time is: @DateTime.Now
@{
var name = “John”;
var nameMessage = "Hello, my name is " + name + " Smith";
}
@{
@:The day is: @DateTime.Now.DayOfWeek. It is a great day!
}
@if(IsPost){
Hello, the time is @DateTime.Now and this
page is a postback!
Hello, today is:
@DateTime.Now// This won’t work in Razor. Content has to be
// wrapped between { }
if( i < 1 ) int myVar=0;
public ActionResult Index()
{
//…
SomeModel model = new SomeModel();
return View(model);
}
Если не удалось найти и скачать презентацию, Вы можете заказать его на нашем сайте. Мы постараемся найти нужный Вам материал и отправим по электронной почте. Не стесняйтесь обращаться к нам, если у вас возникли вопросы или пожелания:
Email: Нажмите что бы посмотреть