Part 41 Using datatype and displaycolumn attributes in asp net mvc application

Video is ready, Click Here to View ×

In this video, we will discuss using datatype and displaycolumn attributes. Please watch Part 40, before proceeding.

Note: In code samples, please replace [ with LESSTHAN character, and ] with GREATERTHAN character

To understand DataType attribute, we will be using the same example, we used in Part 40. Copy and paste the following code in “Employee” class, and navigate to localhost/MVCDemo/Home/Details/1.
public partial class Employee

public class EmployeeMetaData
// Display mailto hyperlink
public string EmailAddress { get; set; }

// Display currency symbol. For country specific currency, set
// culture using globalization element in web.config.
// For Great Britain Pound symbol
// [globalization culture=”en-gb”/]
public int? Salary { get; set; }

// Generate a hyperlink
public string…

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.