/ Published in: C#

Outputs the required form elements to use the ValidateAntiSpamAttribute
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
public static string AntiSpamConfirmation(this HtmlHelper helper) { label.Attributes.Add("for", "sixtimesnine"); label.InnerHtml = "Are you a spam robot?"; p.InnerHtml = string.Format("{0}\n{1}\n{2}", label.ToString(TagRenderMode.Normal), helper.TextBox("sixtimesnine"), helper.Hidden("fourtytwo", "no")); return p.ToString(); }
Comments
