Note IIS 6.0 on Windows Server 2003 has functionality equivalent to URLScan built in.
Response.Write( HttpUtility.HtmlEncode(Request.Form["name"]) );
using System.Text.RegularExpressions; . . . private void Page_Load(object sender, System.EventArgs e) { // Name must contain between 1 and 40 alphanumeric // characters together with (optionally) special // characters '`´ for names such as D'Angelo if (!Regex.IsMatch(Request.Form["name"], @"^[\p{L}\p{Zs}\p{Lu}\p{Ll}]{1,40}$")) { throw new ArgumentException( "Invalid name parameter"); } // Use individual regular expressions to validate //other parameters . . . }
O'Dell
425-555-0123
425 555 0123
986