Sunday, September 25, 2011

ASP.NET MVC 4 Developer Preview



                 One week ago in Build conference Microsoft  announced a lot of their products latest versions developer previews. They are Including Windows 8, VS 2011, ASP.NET MVC 4 etc. In this post l would like to discuss about ASP.NET MVC 4 and lets check what are the new features are included in MVC 4 Developer preview.you can read more details about ASP.NET MVC 4 from asp.net site
http://www.asp.net/mvc/mvc4


Download links
         you can download and install the mvc-4 developer preview using the following links
Install ASP.NET MVC 4 using the Web Platform Installer
 Features at a glance:
        Cosmetic changes:
             Refreshed and modernized default project Template.
             New Template for mobile web applications.
        Other changes
             Adaptive Rendering.
             Redirect to different views based on requested device.
             Enhanced support for asynchronous methods.

                  
MVC team introduced a brand new default Template in MVC 4, using this we can create good looking websites with out much more design effort.

         New Registration and Login windows using JQuery UI
Mobile Application Template with jQuery Mobile
Mobile Log On
Mobile View Registration Form
you can read more details about asp.net mvc 4 developer preview from  Phill Hacck
and Scott Hanselman blog posts. you can read more about mobile features from here .

Tuesday, September 20, 2011

Select All option using jQuery

      selecting some more checkboxes is cumbersome and tedious. usually we are trying select all or Unselect All option by checking or unchecking one. Find the snippet of jQuery to select / unselect the check boxes from a table row by changing one check box value. 

Capture

Here the code:
$(".chkAll").change(function () 
     {           
       var checkState = $(this).attr('checked');
       var row = $(this).closest('tr')   
       $(row).find('input:checkbox').attr('checked', checkState);         
});
by changing the status of first checkbox,we can select or unselect the entire row of checkboxes.

first column checkboxes has contain a class " chkAlland call the jQuery function whenever a change occurred in that checkbox. set the current status of that (chkAll) checkbox in to a variable checkstate and then find the closest table row to the checkbox. After that find all check boxes from that row and change the status of all in to the variable value.