{"id":163225,"date":"2012-12-20T12:29:02","date_gmt":"2012-12-20T08:29:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=163225"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=163225","title":{"rendered":"<span class=\"post_title\">ASP.NET MVC 4 Mobile Features \u0443\u0441\u0442\u0430\u0440\u0435\u043b\u0438 \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0447\u0435\u043c \u043f\u043e\u044f\u0432\u0438\u043b\u0438\u0441\u044c<\/span>"},"content":{"rendered":"<div class=\"content html_format\">\n<h4>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Mobile Features \u0432 ASP.NET MVC 4<\/h4>\n<p>  ASP.NET MVC 4 \u0432\u044b\u0448\u0435\u043b \u0441 \u043e\u0447\u0435\u043d\u044c \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0439 \u0438 \u0434\u043e\u043b\u0433\u043e\u0436\u0434\u0430\u043d\u043d\u043e\u0439 \u043d\u043e\u0432\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u2014 \u0442\u043e, \u0447\u0442\u043e \u043f\u043e \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 Mobile Features \u2014 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432. \u041f\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u043c\u0443 \u0441\u0447\u0435\u0442\u0443, \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0440\u0430\u0437\u0443 \u0443\u0434\u0438\u0432\u0438\u043b\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f. \u041d\u043e \u043f\u0440\u043e\u043c\u043e\u0443\u0448\u0435\u043d \u2014 \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u043c\u043e\u0443\u0448\u0435\u043d. \u0412\u0441\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u043f\u0440\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0441\u0442\u0440\u0430\u043d\u0438\u0446 (layout) \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 HTML 5, \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 viewport, CSS media \u2014 \u0432\u0441\u0435 \u044d\u0442\u043e \u043a MVC \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0443 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u043d\u0435 \u0438\u043c\u0435\u0435\u0442.<\/p>\n<p>  \u041a \u043d\u043e\u0432\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u0430\u043c\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0432\u0430 \u043f\u0443\u043d\u043a\u0442\u0430:  <\/p>\n<ul>\n<li>\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 View \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0445 \u0434\u043b\u044f \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432<\/li>\n<li>\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u043b\u0435\u0442\u0443 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0442\u043e, \u043a\u0430\u043a\u043e\u0435 View \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442\u0441\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u2014 \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u0432 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0435 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 View<\/li>\n<\/ul>\n<p>  \u0418 \u0437\u0434\u0435\u0441\u044c \u0441\u0440\u0430\u0437\u0443 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0441\u043b\u043e\u0432\u043e \u00ab\u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0439\u00bb \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u0440\u0435\u043a\u043b\u0430\u043c\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445. MVC 4 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e View \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0434\u043b\u044f \u043a\u0430\u043a\u043e\u0433\u043e \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043d\u0438\u0445 \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f. \u0422\u043e \u0435\u0441\u0442\u044c, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043d\u0438 \u043a\u043e\u0435\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u043c\u0438.<\/p>\n<h4>\u0412\u0441\u0435 \u0433\u0435\u043d\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u2014 \u00abhook\u00bb \u0432\u043e ViewEngine<\/h4>\n<p>  \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u0430. \u042d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u00abhook\u00bb \u0432\u043e ViewEngine.<\/p>\n<p>  \u0412\u044b \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b (Views) \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0438\u043b\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432. \u0418\u043c\u0435\u043d\u0443\u0435\u0442\u0435 \u0444\u0430\u0439\u043b\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e:  <\/p>\n<ul>\n<li>Catalog.cshtml<\/li>\n<li>Catalog.iPhone.cshtml<\/li>\n<\/ul>\n<p>  \u0417\u0430\u0434\u0430\u0435\u0442\u0435 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0439 \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043d\u0443\u0436\u043d\u0430\u044f View \u2014 \u043f\u043e\u043b\u044c\u0437\u0443\u044f\u0441\u044c DisplayModeProvider \u0437\u0430\u0434\u0430\u0435\u0442\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 DefaultDisplayMode \u0441 \u043d\u0443\u0436\u043d\u044b\u043c \u0438\u043c\u0435\u043d\u0435\u043c.<\/p>\n<pre><code class=\"cs\">DisplayModeProvider.Instance.Modes.Insert(0, new DefaultDisplayMode(&quot;iPhone&quot;) {     ContextCondition = (context =&gt; context.GetOverriddenUserAgent().IndexOf          (&quot;iPhone&quot;, StringComparison.OrdinalIgnoreCase) &gt;= 0) }); <\/code><\/pre>\n<p>  \u0412 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0435, \u043a\u043e\u0433\u0434\u0430 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 ViewResult \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0432\u043e View Engine, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442\u0441\u044f \u0443\u0441\u043b\u043e\u0432\u0438\u044f DisplayModeProvider-a, \u043e\u043d \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 View, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c.<\/p>\n<h4>\u041c\u043e\u0436\u0435\u043c \u043b\u0438 \u043c\u044b \u044d\u0442\u0438\u043c \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f?<\/h4>\n<p><a name=\"habracut\"><\/a><br \/>  \u041c\u043e\u0436\u0435\u043c \u043a\u043e\u043d\u0435\u0447\u043d\u043e. \u041d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445. \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0435 \u043d\u0435\u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d\u043d\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e <b>\u0432\u0441\u0435 View, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u0434\u043b\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c \u0438 \u0442\u0435\u043c \u0436\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430.<\/b> \u0420\u0430\u043d\u043e \u0438\u043b\u0438 \u043f\u043e\u0437\u0434\u043d\u043e, \u044d\u0442\u043e \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439.<\/p>\n<p>  \u0423\u0436\u0435 \u043d\u0430\u0441\u0442\u0430\u043b\u043e \u0432\u0440\u0435\u043c\u044f, \u043a\u043e\u0433\u0434\u0430 \u0432\u0435\u0431-\u0441\u0430\u0439\u0442 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u043d\u044b\u0445 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0430\u0445, \u043d\u043e\u0443\u0442\u0431\u0443\u043a\u0430\u0445 \u0438 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u0445, \u043d\u043e \u0435\u0449\u0435 \u0438 \u043d\u0430 \u0442\u0435\u043b\u0435\u0432\u0438\u0437\u043e\u0440\u0430\u0445. \u041f\u0440\u0438\u0447\u0435\u043c \u043a \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\u043c \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u044b, \u0441\u043c\u0430\u0440\u0442\u0444\u043e\u043d\u044b \u0438 \u043f\u043b\u0430\u043d\u0448\u0435\u0442\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u044b. \u0418 \u0441\u043e\u0433\u043b\u0430\u0441\u0438\u0442\u0435\u0441\u044c \u2014 \u0435\u0441\u043b\u0438 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434 \u043d\u0430 \u043f\u043b\u0430\u043d\u0448\u0435\u0442\u0435 \u0438 \u0441\u043c\u0430\u0440\u0442\u0444\u043e\u043d\u0435 \u0435\u0449\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c, \u0441 \u043e\u0434\u043d\u0438\u043c\u0438 \u0438 \u0442\u0435\u043c\u0438 \u0436\u0435 JavaScript \u0432\u0438\u0434\u0436\u0435\u0442\u0430\u043c\u0438, \u0442\u043e \u0434\u043b\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u0441\u043e\u0442\u043e\u0432\u044b\u0445 \u0442\u0435\u043b\u0435\u0444\u043e\u043d\u043e\u0432, \u043a\u043e\u0438\u0445 \u0435\u0449\u0435 \u043c\u043d\u043e\u0433\u043e, \u0442\u0430\u043a\u043e\u0435 \u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0438 \u0442\u0430\u043a\u0438\u0435 \u0436\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 Web UI \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u043e.<\/p>\n<p>  \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0441\u043c\u0430\u0440\u0442\u0444\u043e\u043d\u043e\u0432 \u0438 \u043f\u043b\u0430\u043d\u0448\u0435\u0442\u043e\u0432 \u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0432\u0437\u0433\u043b\u044f\u0434\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0435 \u0442\u0430\u043a\u043e\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0439 \u2014 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u0432 \u0440\u0430\u0437\u043c\u0435\u0440\u0435 \u044d\u043a\u0440\u0430\u043d\u0430. \u041d\u043e \u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0435\u0439 \u043f\u043b\u043e\u0449\u0430\u0434\u0438 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0438\u043b\u0438 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u0430 \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u0430\u0440\u0442\u0438\u043d\u043e\u043a.<\/p>\n<p>  \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0442\u0435\u043b\u0435\u0432\u0438\u0437\u043e\u0440\u043e\u0432 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439. Full HD \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u044d\u043a\u0440\u0430\u043d\u0430 \u0432 \u043f\u0438\u043a\u0441\u0435\u043b\u0430\u0445. \u041d\u043e \u043d\u0430 \u044d\u0442\u043e\u043c \u043f\u043b\u044e\u0441\u044b \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f.<\/p>\n<p>  \u041e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u0435\u0441\u043b\u0438 \u0412\u0430\u0448 \u0441\u0430\u0439\u0442 \u043e\u0442\u043a\u0440\u044b\u043b\u0438 \u0441 \u0442\u0435\u043b\u0435\u0432\u0438\u0437\u043e\u0440\u0430, \u043e\u043d \u043c\u043e\u0433 \u0431\u044b\u0442\u044c \u043e\u0442\u043a\u0440\u044b\u0442 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445 \u043d\u0430:  <\/p>\n<ul>\n<li>\u0442\u0435\u043b\u0435\u0432\u0438\u0437\u043e\u0440\u0435 Phillips Smart TV \u2014 NetTV SDK \u2014 \u0441\u0430\u0439\u0442 \u043d\u0430 CE-HTML<\/li>\n<li>\u0442\u0435\u043b\u0435\u0432\u0438\u0437\u043e\u0440\u0435 Samsung Smart TV \u2014 \u0443 \u0421\u0430\u043c\u0441\u0443\u043d\u0433\u0430 \u0441\u0432\u043e\u0435 SDK, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u0438\u043b\u044c\u043d\u043e \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f \u043e\u0442 NetTV<\/li>\n<li>\u0442\u0435\u043b\u0435\u0432\u0438\u0437\u043e\u0440\u0435 LG Smart TV<\/li>\n<li>\u0441 \u043f\u0440\u0438\u0441\u0442\u0430\u0432\u043a\u0438 XBOX 360 \u2014 Internet Explorer<\/li>\n<li>\u0441 \u043f\u0440\u0438\u0441\u0442\u0430\u0432\u043a\u0438 PlayStation 3<\/li>\n<li>\u0441 \u043f\u0440\u0438\u0441\u0442\u0430\u0432\u043a\u0438 Wii<\/li>\n<li>\u0441 Google TV, \u0442\u0435\u043b\u0435\u0432\u0438\u0437\u043e\u0440\u044b Sony \u0441\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c Google TV<\/li>\n<li>\u0441 Apple TV<\/li>\n<li>Boxee box, Kylo browser, Roku \u0438 \u0434\u0440\u0443\u0433\u0438\u0435<\/li>\n<\/ul>\n<p>  \u0421\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e \u0441\u0430\u0439\u0442\u0430 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0443\u0434\u043e\u0431\u043d\u0443\u044e \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u044d\u0442\u0438\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u043c\u0430\u043b\u043e \u0440\u0435\u0430\u043b\u0438\u0441\u0442\u0438\u0447\u043d\u043e. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0432\u0441\u0435\u043c\u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044f\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044d\u0442\u0438 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0412\u0430\u043c \u043a\u0430\u043a \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430\u043c \u2014 \u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0432 \u043e\u0434\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0441\u0430\u0439\u0442\u0430 \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043d\u0435 \u0440\u0430\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e. \u0410 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438, \u043f\u043e\u0432\u0435\u0440\u044c\u0442\u0435, \u0441\u0442\u043e\u044f\u0442 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0438\u043c\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 XBOX \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 Internet Explorer, \u0448\u0438\u0440\u0438\u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0430 \u0432\u043f\u043e\u043b\u043d\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u0430\u044f \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043e\u0431\u044b\u0447\u043d\u043e\u0439 \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u043d\u043e\u0439 \u0432\u0435\u0440\u0441\u0438\u0435\u0439 \u0441\u0430\u0439\u0442\u0430, \u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u044b\u043d\u0443\u0436\u0434\u0435\u043d \u043d\u0430 \u0434\u0436\u043e\u0439\u0441\u0442\u0438\u043a\u0435 \u0432\u043e\u0437\u0438\u0442\u044c \u043f\u043e \u044d\u043a\u0440\u0430\u043d\u0443 \u043a\u0443\u0440\u0441\u043e\u0440. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0436\u0430\u0442\u044c \u043d\u0430 \u043a\u043d\u043e\u043f\u043a\u0443 \u043d\u0430 \u044d\u043a\u0440\u0430\u043d\u0435 \u0435\u043c\u0443 \u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043d\u0430\u0432\u0435\u0441\u0442\u0438 \u043d\u0430 \u043d\u0435\u0435 \u043a\u0443\u0440\u0441\u043e\u0440 \u0438 \u043d\u0430\u0436\u0430\u0442\u044c \u043a\u043d\u043e\u043f\u043a\u0443 \u043d\u0430 \u0434\u0436\u043e\u0439\u0441\u0442\u0438\u043a\u0435. \u0421\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u043c, \u0447\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u2014 \u044d\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u0434\u043b\u044f \u043f\u043b\u0430\u043d\u0448\u0435\u0442\u043e\u0432, \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u043f\u0440\u044f\u043c\u043e\u0443\u0433\u043e\u043b\u044c\u043d\u044b\u043c\u0438 \u043a\u043d\u043e\u043f\u043a\u0430\u043c\u0438. \u041a\u043e\u043c\u0431\u043e\u0431\u043e\u043a\u0441\u044b \u0442\u0430\u043a\u0436\u0435 \u043d\u0435 \u0443\u0434\u043e\u0431\u043d\u044b. \u041f\u0440\u043e\u043b\u0438\u0441\u0442\u044b\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043d\u0430 \u0434\u0436\u043e\u0439\u0441\u0442\u0438\u043a\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u043e.<\/p>\n<p>  \u041d\u0430 SmartTV \u0412\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043d\u0435\u0442 \u043a\u0443\u0440\u0441\u043e\u0440\u0430 \u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0431\u0435\u0433\u0430\u0435\u0442 \u043f\u043e \u043a\u043d\u043e\u043f\u043a\u0430\u043c \u0438 \u0438\u043d\u043f\u0443\u0442\u0430\u043c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043d\u0430\u0436\u0438\u043c\u0430\u044f \u043a\u043d\u043e\u043f\u043a\u0438 \u0432\u0432\u0435\u0440\u0445\/\u0432\u043d\u0438\u0437\/\u0432\u043b\u0435\u0432\u043e\/\u0432\u043f\u0440\u0430\u0432\u043e \u043d\u0430 \u043f\u0443\u043b\u044c\u0442\u0435. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0435 \u043a\u043d\u043e\u043f\u043a\u0438 \u043d\u0430 \u043f\u0443\u043b\u044c\u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u043f\u0440\u043e\u0449\u0430\u044e\u0442 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044e, \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044e \u0438\u0437 SDK \u0438 \u043f\u0438\u0441\u0430\u0442\u044c JavaScript \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0439 \u0434\u043b\u044f \u043a\u043e\u043d\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u2014 key codes \u0440\u0430\u0437\u043d\u044b\u0435.<\/p>\n<p>  \u0418 \u044d\u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0441\u043b\u0438 \u043d\u0430\u0447\u0430\u0442\u044c \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0442\u0435\u043b\u0435\u0432\u0438\u0437\u043e\u0440\u044b. \u0421\u043e \u0441\u043c\u0430\u0440\u0442\u0444\u043e\u043d\u0430\u043c\u0438 \u0438 \u043f\u043b\u0430\u043d\u0448\u0435\u0442\u0430\u043c\u0438 \u0442\u0430\u043a\u0436\u0435 \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e, \u043d\u043e \u044d\u0442\u043e \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u0430\u044f \u0438 \u0447\u0430\u0441\u0442\u043e \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0435\u043c\u0430\u044f \u0442\u0435\u043c\u0430.<\/p>\n<p>  \u0421\u0442\u043e\u0438\u0442 \u043d\u0430\u0447\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u044d\u0442\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0438 \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u043e \u0432\u0441\u0442\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u0435\u0440\u0441\u0438\u0438 \u0441\u0430\u0439\u0442\u043e\u0432 \u0434\u043b\u044f \u0434\u0435\u0441\u043a\u0442\u043e\u043f\u043e\u0432, \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0438 \u0442\u0435\u043b\u0435\u0432\u0438\u0437\u043e\u0440\u043e\u0432 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438. \u0418 \u0440\u0430\u0437\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u0434\u043e\u043b\u0436\u043d\u044b \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432\u043e View. \u0414\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438, \u0430 \u0437\u043d\u0430\u0447\u0438\u0442 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e, \u043a\u043e\u0433\u0434\u0430 \u0441 \u043d\u0438\u043c\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u0432.<\/p>\n<h4>\u0427\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442\u044c \u0432\u0437\u0430\u043c\u0435\u043d?<\/h4>\n<p>  \u041f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u0441\u0430\u043c\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0435 \u2014 \u0441\u0440\u0430\u0437\u0443 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0430\u0439\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0438 \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0442\u044c \u043d\u0430 \u043d\u0443\u0436\u043d\u044b\u0439. \u041e\u0442\u043a\u0438\u043d\u0435\u043c \u0442\u0430\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043a\u0430\u043a \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0435. \u041a \u044d\u0442\u043e\u043c\u0443 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0443 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043a\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u0432 \u043b\u044e\u0431\u043e\u0439 \u043c\u043e\u043c\u0435\u043d\u0442.<\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0432 \u043e\u0434\u043d\u043e\u043c \u0438 \u0442\u043e\u043c \u0436\u0435 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0435, \u043d\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u043e\u0433\u043e \u0438 \u043a\u0440\u0430\u0441\u0438\u0432\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0423\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0443 ASP.NET MVC 4, \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. \u0412\u043d\u0443\u0442\u0440\u0438 MVC \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f (\u043f\u0440\u043e\u0435\u043a\u0442\u0430), \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0441\u0430\u0439\u0442\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d \u0432 \u0441\u0432\u043e\u0435\u0439 Area. \u041f\u043e User Agent String \u043c\u044b \u043c\u043e\u0436\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043e\u0442 \u043a\u0430\u043a\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430\/\u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u043f\u043e\u0441\u0442\u0443\u043f\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441 \u0438 \u043d\u0430\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u043d\u0443\u0436\u043d\u0443\u044e Area.<\/p>\n<p>  \u0427\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0432 \u043d\u0443\u0436\u043d\u0443\u044e Area \u043d\u0443\u0436\u043d\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u043e\u0433\u043e \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u0430 (Route) \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435 \u0440\u0443\u0442\u0438\u043d\u0433\u0430 \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 (Constraint).<\/p>\n<p>  <b>\u041c\u0438\u043d\u0443\u0441 \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0443\u0436\u043d\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u043e \u0432\u0441\u0435 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b.<\/b><\/p>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u043c\u044b \u0441\u0434\u0435\u043b\u0430\u043b\u0438 Area \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432\u0441\u0435\u0445 \u0441 Chrome browser, \u0442\u043e Area Registration \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cs\">  public class ChromeAreaRegistration : AreaRegistration   {     public override string AreaName     {       get { return &quot;Chrome&quot;; }     }      public override void RegisterArea(AreaRegistrationContext context)     {       context.MapRoute(           &quot;Chrome_default&quot;,           &quot;{controller}\/{action}\/{id}&quot;,           new { controller = &quot;Home&quot;, action = &quot;Index&quot;, id = UrlParameter.Optional },           new { isChromeBrowser = new IsChromeConstraint() }       );     }   } <\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cs\">  public class IsChromeConstraint : IRouteConstraint   {     public bool Match(HttpContextBase httpContext, Route route, string parameterName, RouteValueDictionary values, RouteDirection routeDirection)     {       string userAgent = httpContext.Request.UserAgent;       if (string.IsNullOrWhiteSpace(userAgent)) { return false; }        return userAgent.Contains(&quot;Chrome&quot;);     }   } <\/code><\/pre>\n<p>  \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f Area, \u043a\u0443\u0434\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b, \u043a\u0440\u043e\u043c\u0435 \u0425\u0440\u043e\u043c\u0430.<\/p>\n<pre><code class=\"cs\">  public class DesktopAreaRegistration : AreaRegistration   {     public override string AreaName     {       get { return &quot;Desktop&quot;; }     }      public override void RegisterArea(AreaRegistrationContext context)     {       context.MapRoute(           &quot;Desktop_default&quot;,           &quot;{controller}\/{action}\/{id}&quot;,           new { controller = &quot;Home&quot;, action = &quot;Index&quot;, id = UrlParameter.Optional },           new { isNotChromeBrowser = new IsNotChromeConstraint() }       );     }   } <\/code><\/pre>\n<p>  \u0432 \u043d\u0435\u0439 \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0444\u0438\u043b\u044c\u0442\u0440\u0443\u0435\u0442 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u044b \u043e\u0442\u0441\u0435\u043a\u0430\u044f \u0425\u0440\u043e\u043c:<\/p>\n<pre><code class=\"cs\">  public class IsNotChromeConstraint : IRouteConstraint   {     public bool Match(HttpContextBase httpContext, Route route, string parameterName, RouteValueDictionary values, RouteDirection routeDirection)     {       string userAgent = httpContext.Request.UserAgent;       if (string.IsNullOrWhiteSpace(userAgent)) { return false; }        return !userAgent.Contains(&quot;Chrome&quot;);     }   } <\/code><\/pre>\n<p>  \u0412\u044b\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u043e\u0432 \u0432\u043e \u0432\u0441\u0435\u0445 Area \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u043d\u0435\u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0442\u043e, \u0447\u0442\u043e \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b \u0432 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0435 \u043f\u0440\u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0441\u0432\u0435\u0440\u0445\u0443 \u0432\u043d\u0438\u0437. \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430\u0446\u0438\u0438 AreaRegistration \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439. \u042d\u0442\u043e\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043c\u0430\u0440\u0448\u0440\u0443\u0442\u044b \u0432\u0441\u0435\u0445 Area \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u2014 \u0432 Global.asax \u2014 \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044f \u0438\u0445 \u043f\u043e\u0440\u044f\u0434\u043e\u043a. \u0422\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0425\u0440\u043e\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440 \u0432\u0441\u0435\u0433\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442\u044c \u043f\u0435\u0440\u0432\u043e\u0439.<\/p>\n<h4>\u041f\u043e\u0441\u0442\u0441\u043a\u0440\u0438\u043f\u0442\u0443\u043c<\/h4>\n<p>  \u0415\u0441\u043b\u0438 \u0412\u0430\u043c \u044d\u0442\u043e \u043d\u0430\u0434\u043e\u0435\u0441\u0442, \u0432\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u043c\u043e\u0436\u0435\u0442\u0435 \u043b\u0435\u0433\u043a\u043e \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u043a\u0430\u0436\u0434\u0443\u044e Area \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0445\u043e\u0441\u0442\u0438\u0442\u044c \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0434\u043e\u043c\u0435\u043d\u0430\u0445.    \t   \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/company\/dnevnik_ru\/blog\/163225\/\"> http:\/\/habrahabr.ru\/company\/dnevnik_ru\/blog\/163225\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">\n<h4>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 Mobile Features \u0432 ASP.NET MVC 4<\/h4>\n<p>  ASP.NET MVC 4 \u0432\u044b\u0448\u0435\u043b \u0441 \u043e\u0447\u0435\u043d\u044c \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0439 \u0438 \u0434\u043e\u043b\u0433\u043e\u0436\u0434\u0430\u043d\u043d\u043e\u0439 \u043d\u043e\u0432\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u2014 \u0442\u043e, \u0447\u0442\u043e \u043f\u043e \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u0438 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 Mobile Features \u2014 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432. \u041f\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u043c\u0443 \u0441\u0447\u0435\u0442\u0443, \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0440\u0430\u0437\u0443 \u0443\u0434\u0438\u0432\u0438\u043b\u043e, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0441\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0441 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u043d\u043e\u0432\u043e\u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044f. \u041d\u043e \u043f\u0440\u043e\u043c\u043e\u0443\u0448\u0435\u043d \u2014 \u0435\u0441\u0442\u044c \u043f\u0440\u043e\u043c\u043e\u0443\u0448\u0435\u043d. \u0412\u0441\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u044f \u043f\u0440\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0441\u0442\u0440\u0430\u043d\u0438\u0446 (layout) \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 HTML 5, \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 viewport, CSS media \u2014 \u0432\u0441\u0435 \u044d\u0442\u043e \u043a MVC \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0443 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044f \u043d\u0435 \u0438\u043c\u0435\u0435\u0442.<\/p>\n<p>  \u041a \u043d\u043e\u0432\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0441\u0430\u043c\u043e\u0433\u043e \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u043d\u0435\u0441\u0442\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0432\u0430 \u043f\u0443\u043d\u043a\u0442\u0430:  <\/p>\n<ul>\n<li>\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 View \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0445 \u0434\u043b\u044f \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0445 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432<\/li>\n<li>\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u043b\u0435\u0442\u0443 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0442\u043e, \u043a\u0430\u043a\u043e\u0435 View \u0431\u0443\u0434\u0435\u0442 \u0440\u0435\u043d\u0434\u0435\u0440\u0438\u0442\u0441\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u2014 \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u0432 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0435 \u043c\u0435\u0436\u0434\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 View<\/li>\n<\/ul>\n<p>  \u0418 \u0437\u0434\u0435\u0441\u044c \u0441\u0440\u0430\u0437\u0443 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0441\u043b\u043e\u0432\u043e \u00ab\u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u0439\u00bb \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432 \u0440\u0435\u043a\u043b\u0430\u043c\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445. MVC 4 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e View \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0445 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0434\u043b\u044f \u043a\u0430\u043a\u043e\u0433\u043e \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430 \u043a\u0430\u0436\u0434\u0430\u044f \u0438\u0437 \u043d\u0438\u0445 \u0434\u043e\u043b\u0436\u043d\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f. \u0422\u043e \u0435\u0441\u0442\u044c, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043d\u0438 \u043a\u043e\u0435\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u043c\u043e\u0431\u0438\u043b\u044c\u043d\u044b\u043c\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u043c\u0438.<\/p>\n<h4>\u0412\u0441\u0435 \u0433\u0435\u043d\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u2014 \u00abhook\u00bb \u0432\u043e ViewEngine<\/h4>\n<p>  \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u0430. \u042d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u00abhook\u00bb \u0432\u043e ViewEngine.<\/p>\n<p>  \u0412\u044b \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u0440\u0430\u0437\u043d\u044b\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b (Views) \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432 \u0438\u043b\u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043e\u0432. \u0418\u043c\u0435\u043d\u0443\u0435\u0442\u0435 \u0444\u0430\u0439\u043b\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044f \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0435 \u0441\u043b\u043e\u0432\u043e:  <\/p>\n<ul>\n<li>Catalog.cshtml<\/li>\n<li>Catalog.iPhone.cshtml<\/li>\n<\/ul>\n<p>  \u0417\u0430\u0434\u0430\u0435\u0442\u0435 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0439 \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043d\u0443\u0436\u043d\u0430\u044f View \u2014 \u043f\u043e\u043b\u044c\u0437\u0443\u044f\u0441\u044c DisplayModeProvider \u0437\u0430\u0434\u0430\u0435\u0442\u0435 \u043d\u0443\u0436\u043d\u044b\u0435 DefaultDisplayMode \u0441 \u043d\u0443\u0436\u043d\u044b\u043c \u0438\u043c\u0435\u043d\u0435\u043c.<\/p>\n<pre><code class=\"cs\">DisplayModeProvider.Instance.Modes.Insert(0, new DefaultDisplayMode(&quot;iPhone&quot;) {     ContextCondition = (context =&gt; context.GetOverriddenUserAgent().IndexOf          (&quot;iPhone&quot;, StringComparison.OrdinalIgnoreCase) &gt;= 0) }); <\/code><\/pre>\n<p>  \u0412 \u0440\u0430\u043d\u0442\u0430\u0439\u043c\u0435, \u043a\u043e\u0433\u0434\u0430 \u043e\u0442\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u0430, \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 ViewResult \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442\u0441\u044f \u0432\u043e View Engine, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442\u0441\u044f \u0443\u0441\u043b\u043e\u0432\u0438\u044f DisplayModeProvider-a, \u043e\u043d \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430 View, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c.<\/p>\n<h4>\u041c\u043e\u0436\u0435\u043c \u043b\u0438 \u043c\u044b \u044d\u0442\u0438\u043c \u0440\u0435\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f?<\/h4>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-163225","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/163225","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=163225"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/163225\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=163225"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=163225"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=163225"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}