TL;DR Add following line to your .csproj file: <MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish> Introduction I was publishing a project I am working on to web server (Linux) and I had an issue with Razor Pages. However, it seems that this error occurs only when you precompile your Razor views (MVC views, Razor Pages). Why would you do that? Well, […]
Continue readingIntroduction In on of the previous posts we talked about Tag Helpers, we also talked about caching Tag Helpers and form Tag Helpers. By creating our custom Tag Helpers, we have an ability to extend existing HTML elements or create our custom HTML elements. A Tag Helper is any class that implements ITagHelper interface. However, MVC […]
Introduction In the last post, we talked about Razor Pages. Today we will talk more about handlers. We saw that we could have our code and model either in a .cshtml file or inside of code behind file that matches the .cshtml – .cshtml.cs file. Razor Page Handlers or Handler Methods are a way of connecting user requests […]
Continue readingIntroduction With ASP.NET Core 2 around the corner, the hottest new thing that we are getting is Razor Pages. In one of the previous posts, we briefly mentioned ASP.NET Core Razor Pages. Razor Pages is a new feature of ASP.NET Core that makes coding page-focused scenarios easier and more productive. Initial impression of the public […]
Continue readingIntroduction We already talked about Tag Helpers, we mentioned some of the most used Tag Helpers and we also talked about caching Tag Helpers. In this post, we will talk about form Tag Helpers. HTML or Web Form is used to collect an input from the user using various HTML elements like inputs, checkboxes, radio […]