I have the following:
public class myViewModel
{
[DisplayName("User ID")]
[DataType("string")]
public MyCustomDataType UserID { get; set; }
}
I want to define MyCustomDataType as a user defined data type and have my getter and setter handle the data based on DataType. ie: if string, return string...etc. How can I define MyCustomDataType so that it is aware of field's DataType? And how would I define the getter and setter?
The reason behind this is I want to mask certain fields that contain senstive data. This is related to this post