William Duffy

Glasgow Based C# ASP.NET Web Developer

Tag archive for ‘Regular Expressions’

ASP.NET’s Image Upload Filetype Validation

ASP.NET’s file upload facility offers a quick, easy method for allowing users to upload content to your server. In many cases however the upload type must be restricted. For example, perhaps you are allowing users to upload a profile image. You certainly don’t want them to be capable of uploading an executable (.exe) file! The [...]

ASP.NET’s “Internet Url” Regular Expression Validator

The regular expression validator is a great tool when a fast, robust, content validator is required. Drop it on the page, choose it’s ControlToValidate and give it an expression to match against the specified control’s content. There are even built in expressions to choose from….one of which is “Internet URL”. The problem with this is [...]