Jquery.load() with MVC how to load view when Exception appear
Jquery.load() with MVC how to load view when Exception appear
6 Replies
im trying to implement dynamic load page in asp net core MVC with JQUERY
its fine but i have a problem when there is some error (status 500), i have costum Exception HTML view return in my app (throw new CustomReturnException()) and this is returned in this above method response
but jquery.load didnt load this ;/
its there a way to just ignore not success in jquery.load and just load my error page?
if that js code is in a js file, it's not going to evaluate the @html directives
its in my cshtml page in script sections
so i get html in response
i think its due to status 500
jquery.load return success == false and not continue to load
yeah
you'll need to use $.ajax (I think it is) and handle it at a lower level
unless load lets you pass in an error callback