Alternate ways to invoke a REST API

.NET offers two alternate ways to access a REST API (including ASP.NET Web API). The typical way to access a REST API is using the HttpClient.

The HttpClient does a POST on the REST API and receives a JSON

Validating URL using Validation attribute

When a user enters an URL in a TextBox, the URL needs to be validated. Validation attributes can be used to check if the URL is live.

The Url property is part of an entity object. UrlValid is derived

An extension method for HtmlHelper to display error messages

Data annotations is used to validate user input.

The Controller class contains the Model State. If the Model State is not valid, the error messages are contained as dictionary, with the key corresponding to the name of the user