Pills of C#: strings

In many times people have asked me some question about strings in C#. The much quoted question is about: “What is the @ before the string?”

So, now I want try to give some pills about those strings in C#.

Just to be clear, I’m assuming that you already know a base of C# and strings operations (concats, escaping, etc.)

Continue reading “Pills of C#: strings”

Change layout for authenticated users in asp net core

When we talk about MVC on asp net, we know that the views are (in default approach) parts of our web page, because we have definedĀ a layout that contains them. But sometimes we need/want to use a different layout, one of these scenario is for example when we have a different layout for logged/not logged users.

Let’s see an example, which use the simple AuthenticationCookie from NuGet package Microsoft.AspNetCore.Authentication.Cookies.

Continue reading “Change layout for authenticated users in asp net core”