This enables the client-side validation library to automatically call a custom method that you define on the server in order to perform validation logic that can only be done server-side.
See In the following below example, the
Remote attribute specifies that client validation will call an action named UserNameAvailable on the UsersController class in order to validate the UserName field.C#
public class User
{
[Remote("UserNameAvailable", "Users")]
public string UserName { get; set; }
}The following example shows the corresponding controller.
C#
public class UsersController
{
public bool UserNameAvailable(string username)
{
if(MyRepository.UserNameExists(username))
{
return "false";
}
return "true";
}
}

Gowtham RajamanickamTOP 100Posted Jul 8, 2015, 8:31 PM EDT
good one