Friday, March 18, 2011

Next ASP.NET version will include important features from MVC

Despite the excitement around MVC, ASP.NET WebForms are still very popular. According to Evonet Consulting, the next major ASP.NETrelease will contain a number of features originally introduced in MVC, including Model Binders, unobtrusive client-side validation, and CSS sprites.

How to implement TSQL in clause by LINQ, Contains Method of List(Of T)

        string[] countrycode = null;
        countrycode = listofcountrycodes.Split(',');
        dataSource.StateList.Where(s => countryCodes.Contains(s.CountryCode))

How to detect mouse right click paste event in JQuery ?

$('#controlId').bind('paste', null, function(e) {
  if(!e.keyCode){
       /*
         since no key was down at the time of the event we can assume it was
          from the toolbar or right click menu, and not a ctrl+v
       */
    }
});

http://rayaspnet.blogspot.com/2011/01/how-to-implement-textchanged-event.html

Entity framework does not support mapping an int column to Enum

Solutions:
Use a Foreign Key to a reference table and model this with an association (which is completely overkill).

Two ways for Workarounds
http://cticoder.wordpress.com/2008/08/16/using-enums-with-entity-framework/
http://blogs.msdn.com/b/alexj/archive/2009/06/05/tip-23-how-to-fake-enums-in-ef-4.aspx

IE9 CSS3 selector and HTML5 test result

CSS3 Selectors Test:: 100%
http://tools.css3.info/selectors-test/test.html
HTML5:
155 out of 400
http://html5test.com/

IE9 Speed test, V8

IE 9 is better than Firefox,  worse than Chrome
http://v8.googlecode.com/svn/data/benchmarks/v6/run.html