C# Class Mvc.Honeypot.HtmlHelpers

Show file Open project: dejanstojanovic/MVC-Honeypot

Public Methods

Method Description
GetHashedPropertyName ( string PropertyName ) : string

Calculates MD5 HASH

HoneyPotField ( this helper, string name, object value, string inputCss = null, InputType fieldType = InputType.Text, string honeypotCss = null, InputType honeypotType = InputType.Hidden ) : System.Web.Mvc.MvcHtmlString

Renders out field with honeypot security check enabled

Method Details

GetHashedPropertyName() public static method

Calculates MD5 HASH
public static GetHashedPropertyName ( string PropertyName ) : string
PropertyName string Name of property that needs to be hashed
return string

HoneyPotField() public static method

Renders out field with honeypot security check enabled
public static HoneyPotField ( this helper, string name, object value, string inputCss = null, InputType fieldType = InputType.Text, string honeypotCss = null, InputType honeypotType = InputType.Hidden ) : System.Web.Mvc.MvcHtmlString
helper this HtmlHelper which will be extended
name string Name of field. Should match model field of string type
value object Value of the field
inputCss string
fieldType InputType
honeypotCss string
honeypotType InputType
return System.Web.Mvc.MvcHtmlString