I am using .NET Core MVC. In the .cshtml
page, I am using the data from the model but when the data is null, I am getting the error below. I want to set a blank (" ") value if a null or empty value comes from the model. How can I do that?
@(Model.Username == null ? "" : Model.Username)
I try that but it didn't work.