One of the new features of ASP.NET Core 2.1 is, Razor UI as a class library. It makes easier to build and include Razor based UI in a library and share it across multiple projects. A new Razor SDK will enable building Razor files into a class library project that can then be packaged into a NuGet package. You can package your Razor views and pages (.cshtml files) along with your controllers, page models, and data models. Apps can then include pre-built UI components by referencing these packages and customize the UI by overriding specific views and pages. In this post, we’ll see how to create Razor UI as class library and how to reuse it. (more…)
Razor Pages are a new feature of ASP.NET Core 2.0 that makes coding page-focused scenarios easier and more productive. Razor Pages are introduced with the intent of creating page focused scenarios where there is no real logic is involved. You can find all my razor pages posts here. The latest version (2.1) of ASP.NET Core supports HTTPS by default, but at the time of writing this post, it is still in the preview release. You can find all my ASP.NET Core 2.1 posts here. The app built on ASP.NET Core 2.0 version needs to be secured manually. In this post, we will see how to enforce HTTPS in ASP.NET Core Razor Pages applications. (more…)
In this short post, find the code to disable Anti-forgery token validation globally in ASP.NET Core Razor pages. If you are new to Razor Pages, It’s a new feature of ASP.NET Core that makes coding page-focused scenarios easier and more productive. Razor pages use handler methods to deal with the incoming HTTP request (GET/POST/PUT/Delete). (more…)
Last year around this time I wrote about Import and Export xlsx in ASP.NET Core, using an unofficial version of EPPlus.Core as EPPlus didn’t have .NET core support. In fact, many such popular libraries lacked support for .NET Core as the framework was not mature enough then. When .NET Standards came, the situation improved a bit, but the release of .NET Standards 2.0 was a booster for .NET Core as that helped to port existing .NET Framework based libraries to use with .NET Core.
NPOI is another very popular package for reading/writing excel files, and it also has .NET core version as well. This post talks about how to import or export excel files (xls or xlsx) using NPOI package with ASP.NET Core 2.0 Razor pages. (more…)
If you are a fan of ASP.NET Web forms and miss them, ASP.NET Core Razor Pages gives you the exact same feeling of ASP.NET Web forms. Razor Pages are a new feature of ASP.NET Core 2.0 that makes coding page-focused scenarios easier and more productive. Razor Pages are introduced with the intent of creating page focused scenarios where there is no real logic is involved. This short post talks about the solution for uploading multiple files in ASP.NET Core Razor Pages using jQuery and Ajax. (more…)