Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Marc-André 63 posts 279 karma points
    Apr 27, 2020 @ 17:33
    Marc-André
    0

    Prevent reloading page on validation failed

    Hello,

    I can't find any tips for this so I'm asking here again :

    How can we prevent the page from reloading after submitting a form, either if validation fail or not.

    Thanks.

  • Yakov Lebski 591 posts 2347 karma points
    Apr 28, 2020 @ 14:55
    Yakov Lebski
    0

    You need to enable client side validation

    by adding jquery.validate.js and jquery.validate.unobtrusive.js

  • Marc-André 63 posts 279 karma points
    Apr 28, 2020 @ 14:57
    Marc-André
    0

    Hi!

    I've already added those scripts and it does not change a thing. Is thete another setting I need to activate?

  • Yakov Lebski 591 posts 2347 karma points
    Apr 28, 2020 @ 15:07
    Yakov Lebski
    100

    if you want enamble it cross site you should add keys in web.config

      <add key="ClientValidationEnabled" value="true" />
      <add key="UnobtrusiveJavaScriptEnabled" value="true" />
    
  • Marc-André 63 posts 279 karma points
    Apr 28, 2020 @ 15:13
    Marc-André
    0

    Oh yeah! Thanks a lot!!!

Please Sign in or register to post replies

Write your reply to:

Draft