I am using MVC3 with Jquery’s .load() with a PartialView().
From my jquery, I am doing the following:
$("#stlist").load('@Url.Action("KitEdit","Kit")' + '?id=' + id+ '&pick=' + pick)
The partial view is called from the KitEdit action.
I was wondering if there is another way of loading a partial view besides the .load()?
I am getting some wierd behaviors where once the .load is done, some of the buttons don’t work the second time.
Is the partial view displayed without refreshing the entire page? If so, you need to add some jQuery that will run after the partial view is loaded to hook up all of the controls in the partial view. What I would suggest is adding a complete function (http://api.jquery.com/load/) to your jQuery .load() call like this:
Then the complete function would hook up all the controls from the partial view.
Hope this helps!