0





81
1

I have found jQuery to be a great tool to simplify my MVC Views.

For example, instead of including complicated logic to add alternating styles to my tables I just do this...

$(document).ready(function() {
   $("table.details tr:odd").addClass("detailsAlternatingRow");
   $("table.details tr:even").addClass("detailsRow");                          
});

Do you know of any other good uses of jQuery to slim down the logic in my MVC View?

Question author Elijah-manor | Source

0


1

MVC Framework has a JsonResult that can be very nice to eliminate server round trips and might be able to get rid of some of the logic in your view page. I wrote a tutorial on this available at :

http://www.dev102.com/2008/08/19/jquery-and-the-aspnet-mvc-framework/

Answer author Ryan-lanciaux

Ask about this question here!