asp.net mvc 3 - Remote Validation or Jquery ajax call shoud in ASP MVC? -


i wonder best method valid form in asp mvc.

i have used jquery ajax check username exits in database. problem when submit form, method need me click username field execute onblur function ajax call, doesn't show previous error message.

with remote validation, execute when leave or focus out username. problem way can't manage error message such : the username must @ least 3 charaters.... or the username taken.

anyone can give me suggestion or link how valid form ontime (it means when user leave out field , go ahead next field, page: http://yame.vn/taikhoan/dangky ) ?

use

$("#username").focusout(function(event){      var name = $(this).attr('value');        if(name.length>=3)        {     searchcustomer();//function containing ajax call     } else {   //show error message of length less 3 } }); 

Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -