Blog

Page 268 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for How to get the current user in ASP.NET MVC
c#.net

How to get the current user in ASP.NET MVC

Published on September 2, 2023

# šŸ•µļøā€ā™‚ļø Who is the User? ASP.NET MVC Knows! If you've been scratching your head, wondering how to find the current user in ASP.NET MVC, you're not alone! Many developers have faced this mysterious challenge. But fear not, my friend - I've got your back!

Cover Image for Replace line break characters with <br /> in ASP.NET MVC Razor view

Replace line break characters with <br /> in ASP.NET MVC Razor view

Published on September 2, 2023

# šŸ’» Tech Blog: How to Replace Line Break Characters with &lt;br /&gt; in ASP.NET MVC Razor View Hey there tech enthusiasts! šŸ‘‹ Welcome back to our blog, where we unravel complex problems and provide simple solutions. Today, we will address a common issu

Cover Image for How to get the Display Name Attribute of an Enum member via MVC Razor code?
c#

How to get the Display Name Attribute of an Enum member via MVC Razor code?

Published on September 2, 2023

## How to Get the Display Name Attribute of an Enum Member via MVC Razor Code? šŸ˜ŽšŸ’» Have you ever found yourself in a situation where you needed to display the display name attribute of an enum member in your MVC Razor code? šŸ¤” Fear not! In this blog post

Cover Image for Date only from TextBoxFor()

Date only from TextBoxFor()

Published on September 2, 2023

# šŸ—’ļø A Guide to Displaying Only the Date from TextBoxFor() Using ASP.NET MVC Are you struggling to display only the date part of a DateTime in a TextBoxFor() using ASP.NET MVC? Don't worry, you're not alone! Many developers face this challenge when worki

Cover Image for Should services always return DTOs, or can they also return domain models?

Should services always return DTOs, or can they also return domain models?

Published on September 2, 2023

šŸ“ **DTO vs. Domain Models: The Great Debate** Are you building a large-scale application using a multi-layer architecture based on Domain-Driven Design (DDD)? Then you've probably come across the question of whether services should always return Data Tra

Cover Image for ASP.NET "special" tags
syntax

ASP.NET "special" tags

Published on September 2, 2023

šŸ“ **ASP.NET "Special" Tags: A Handy Guide to Understanding and Utilizing Them** šŸ‘‹ Hey there, tech enthusiasts! Are you puzzled by those quirky "<%# %>", "<%= %>", "<%@ %>", and "<%$ %>" tags in ASP.NET? šŸ¤” Well, you're not alone! These "special" tags ca

Cover Image for Non-static method requires a target
c#

Non-static method requires a target

Published on September 2, 2023

# Hey friends! Having trouble with the "Non-static method requires a target" error? Don't worry, I got your back! šŸ˜Ž So, you're running into this error message while trying to use a controller action in your web application. This error typically occurs wh

Cover Image for ASP.NET MVC 3 - Partial vs Display Template vs Editor Template

ASP.NET MVC 3 - Partial vs Display Template vs Editor Template

Published on September 2, 2023

# ASP.NET MVC 3: Partial vs Display Template vs Editor Template šŸ’»šŸ”„ So, you're working on your ASP.NET MVC 3 project and you're faced with the decision of whether to use a Partial View, Custom Display Template, or Custom Editor Template. It can be confus

Cover Image for How can I return the current action in an ASP.NET MVC view?
c#

How can I return the current action in an ASP.NET MVC view?

Published on September 2, 2023

# How to Get the Current Action in an ASP.NET MVC View? So, you're working on your ASP.NET MVC application and you want to set a CSS class in your master page based on the current controller and action. You've already found a way to get the current contro

Blog | Matheus Mello