1

In "traditional" ASP.NET (Web Forms), the UpdatePanel control lets you do a partial refresh of a part of a page. You don't need to write much code to hook this up.

What's the equivalent in ASP.NET MVC? I'm guessing I'd need to use a partial view for the bit that I want to update, then on the client side retrieve that HTML and pump it into the innerHtml of the correct DIV?

A tutorial/example would be helpful...

2 Answers 2

1

A quick google with your tags throws up a bunch. This is pretty good:

http://www.iridescence.no/post/Partial-Rendering-with-ASPNET-MVC-and-jQuery.aspx

And yes, you're just calling a controller to return rendered HTML which you then inject. Much lighter than the updatepanel and almost as easy to implement.

Sign up to request clarification or add additional context in comments.

Comments

1

Have a look at Superload. I think it's the closest thing to the update panel that I've seen for asp.net mvc. Otherwise you can use jquery ajax, .load() or .get(), to update any parts of the page or divs. You just have to manually set the parameters as needed.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.