asp.net mvc 4 - How to Display a mesaage if I tried to save duplicate data into database in mvc4 .NET -
i creating mvc4 project in .net framework.i have html page has text boxes input , below 4 button there save, update, delete, show. working well.
now want put validation in project
- if tried save data there(primary key enable in database) message should display "data present" , data should show.
- in date column.date should not exceed system date , not less 3 days before date.
- create action method in controller takes data , check in
database dublicate e.g. isrecordexist(parameters) - if data exist in database function should return true else return false
- create jquery function checkdublicate() function should return true or false
- inside function use ajax() function pass data function in controller return true record exist if false record not in database
- now on form submit call checkdublicate() function if return true data exist , show errors using validationengine().
Comments
Post a Comment