asp.net mvc 3 - View the Validation summery in the required place -


i have partial view in main view in mvc3. partial view has it's own modelstate.addmodelerror in action method , main view has modelstate.addmodelerror in action method. when code runs , main view error wants displayed, partial view has validationsummery tag, validation summery shows in both places.

how fix issu?? thanks.

you can jquery

$(function(){     var error = "";     $("classnameofvalidationsummarydiv").each(function(){          error = error + $(this).html();      });      $("idofdivwhereuwanttoshow").append(error);      }); 

hope work


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -