In your MVC models, if you have a date property which is populated from the database with Date and Time, it’s very easy to format the output so that it’s just the date (toShortString()). However, there are two ways to do this, using Display/Edit Annotations.
Let’s say you have an Action method named ‘Edit’. public ActionResult Edit(int CustID) However you really don’t like the word ‘Edit’ for some reason. there is a very easy way to create an Alias for your Action method to be used in place of the one already there.
During my MVC learning process, my first app started with a basic display form – the data received from the database was in decimal format. So my first stumbling block was figuring out how to make it display as a decimal on screen. The second stumbling block was making it display as a decimal in […]
All Things DotNet Discussed – Winforms/ASP.Net/SharePoint/WPF