Using of JSON Result in Asp.net MVC 1.0(weblogs.asp.net)
submitted by
mehfuzh(1906) 3 years ago
In a post few month back , i showed how can i simulate a callback using JQuery and ASP.NET with my experimental FlickrXplorer project. More detail on this can be found at the following URL
http://weblogs.asp.net/mehfuzh/archive/2008/10/13/using-jquery-to-do-ajax-form-posts-in-asp-net-mvc.aspx
Now, what i have done here is basically, i did an AJAX call to the controller and rendered the view result in a div. One thing about this way is that i am able to make the view strongly typed as i first rendered view using standard way with all the strongly type ViewData.Model. It is nice for rendering views with small amount of html in it (Like , tag lists), but slow for big outputs. The best practice for all these is to use the JSONResult. Here, i will show a small example of how i render the comment list in FlickrXplorer using JSON result and JQuery $.Post in conjunction to make the AJAX request.
read more...
|category: ASP.NET
|Views: 170
tags:
ASP.NET another
Everyones tags:
Your Tags: