server side validation in jquery dialog server side validation in jquery dialog ajax ajax

server side validation in jquery dialog


heh.
this is why i love programming.
the solution is very simple and i post it here to avoid other people to spent a day searching that bug.
in my solution i forget to attach function to button close when i reload content of the dialog box. this is why click on the close button after server validation redirect to this action (Home/Create).

$("#divInsert").html(data);$.validator.unobtrusive.parse($("#divInsert"));

after this code i add this code and its working.

$("#inputCloseModal").click(function () {    dialog.dialog('close');    return false;});