Is it possible to have a ActionFilterAttribute parameters like this ?
[DataType(DataType.Password)]
For example I need to create something like this
[ValidateSession(Session.Required)]
public class ValidateSession : ActionFilterAttribute
{
enum Session
{
Required,
NotRequired
}
private Session _session { get; set; }
public ValidateSession(Session session)
{
this._session = session;
}
}
You can add parameters to custom ActionFilter. For more information see this.