url: "Customers/{id}", defaults: new { controller = "Customer", action = "Get" }, constraints: new { httpMethod = new HttpMethodConstraint("GET") } ); routes.MapRoute( name: "CustomerUpdate", url: "Customers/{id}", defaults: new { controller = "Customer", action = "Update" }, constraints: new { httpMethod = new HttpMethodConstraint("POST") } ); routes.MapRoute(...
Monday, February 13, 2012
February 13, 2012
Although JQuery provides a very good support for caching responses from AJAX calls in the browser, it is always good to know how you can use http as protocol for making an effective use of it. The first thing you need to do on the server side is to supports HTTP GETs, and identify your resources with different URLs for retrieving the data (The resource in this case could be just a MVC action). If you use the same URL for retrieving different resource...
Wednesday, February 8, 2012
February 08, 2012
This post will demonstrate how to do rock-solid phone number validation using the .NET port of Google'slibphonenumber. When validating phone numbers you tend to end up either frustrating users with strict input requirements or with complicated regexes to cover all the interesting ways that users input phone numbers. If you have to also check international numbers (as we do at AppHarbor) the task becomes almost impossible. Enter libphonenumber,...