I am new to MVC and have not found a solution for this online.
I have the html as :
@Html.DisplayFor(model => model.Address1) <br />
I want all the first letter of address1 to be capital letters e.g. Something Road instead of something road.
Now I have a class client and property Address1 and using EF to get the address as follow:
public class MyDBContext : DbContext
{
public DbSet<Client> Clients { get; set; }
}
Hope it makes sense.
It’s best to keep the presentation layer and the data access layer separate. Create a view model that wraps or translates the ORM / entity framework objects.