Part 89 Remote validation in asp net mvc

kudvenkat · 87K views · 2013 · 12:07

Open on YouTube

Web developmenttutorialdated

Why Stack Overflow recommends it

Stack Overflow users link it when someone needs to check a field such as a username or email for uniqueness against the database in ASP.NET MVC.

Recommended by 3 people across 3 different months, 2014 to 2017.

What it is

A 12-minute ASP.NET MVC tutorial from kudvenkat's long-running C# and MVC series showing how to use RemoteAttribute for remote validation. The demo builds a user registration page that checks the database so a duplicate username is flagged immediately, using an entity data model and a controller action.

What people said

Recommends user3848402 · 2014-08 · Stack Overflow · on “Working with Remote Validation asp.net MVC”

i like to try using remote validation that i spot on this link: [this video] i've followed the instruction and it worked but the problem is, when i try to add data from referenced table, the validation wont worked Model Class: public partial class ms_student { public int ID { get; set; } public string student_code{ get; set; } public virtual ms_person ms_person { get; set; } } public partial class ms_person { public string name{ get; set; } public string email { get; set; } public virtual ms_student ms_student { get; set; } } Metadata: using System; using System.Collections.Generic; using System.ComponentModel; using System.ComponentModel.DataAnnotations; using System.Web.Mvc; namespace Test.Mode

Recommends Vinod · 2015-03 · Stack Overflow · on “how to string field be unique mvc 5 asp.net”

SportID would be unique ( for most of the cases - Primary key fetch from DataBase ) Wrt SportName to be unique you have take precaution ( Place Validation rule - Client/Server Side ) i would recommend for RemoteValidation in MVC . Remote Validation [LINK] Remote Validation Video [this video]

Recommends whisk · 2017-07 · Stack Overflow · on “Updating user email to see if its stayed the same or is being updated”

OK I used what you said and used This [this video] video, and it works. So when testing it I am able to change the last record added to the same email address as to any record previous. What would cause this?