1

I have some questions: I tried out asp.net mvc and have jquery ajax [http get] to retrieve partial mvc views , which will be used in partial page update. I wonder this is a acceptable approach to do partial page update.

Now I am working with a asp.net aspx project. How to do a partial page update with asp.net ?

1 Answer 1

1

Yes its an acceptable solution. You could use the .load() function as well which calls $.ajax internally.

$('#MyDiv').load('/MyURL/GetParialView');

That will load the html returned from the URL into the div with an id of 'MyDiv'.

By asp.net I assume you mean Web Forms. Both MVC and web forms are built on ASP.NET. However in web forms you can still use jquery to return json or html from a webservice. Web forms also uses a control called an update panel that abstracts some of the complexities of Ajax. A word of caution though update panels can be very easy to implement but can become confusing when dealing with larger complicated applications.

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

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.