I have a partial view defined like this in my /Shared
folder
<div id="myProducts">
@Html.Partial("_ProductsList",Model)
</div>
I want to load _ProductsList
through JQuery. Basically, I am trying to refresh my _ProductsList
view on button click. I tried to do like this:
$('myProducts').Load(/Shared/_ProductsList)
But I get a "resource not found error".
/Shared/_ProductsList
should be in quotes within your jQuery. I assume that's a typo. Also, can you confirm that you're able to navigate to/Shared/_ProductsList
and get a response back? That will help confirm that this isn't a routing issue./Shared/_ProductsList
partial view. You can call this method from the jquery as you do with other views