I need following attributes:
1.For example: i have 2 field. first is checkbox, second is textbox. If first control checked. second field must be Required
attribute. first control unchecked. second control not required.
[Required]
public boolean showHeader{get;set;}
[IFRequired("showHeader",true)]
public string HeaderText{get;set;}
2.For example: i have 2 field. new password, confirmation password. Attribute must check this 2 field are equal.
[Required]
public string newPassword{get;set;}
[Expression("newPassword",ExpressionAttributeEnum.Equils)]
public string confirmPassword{get;set;}
How to create above attributes?