Difference between == and === in JavaScript

The 3 equal signs mean “equality without type coercion”. Using the triple equals, the values must be equal in type as well.

0 == false   // true
0 === false  // false, because they are of a different type
1 == "1"     // true, automatic type conversion for value only
1 === "1"    // false, because they are of a different type
null == undefined // true
null === undefined // false
'0' == false // true
'0' === false // false

Creating API Help Pages

Install ASP.NET and Web Tools 2012.2 Update. This update integrates help pages into the Web API project template.

Next, create a new ASP.NET MVC 4 project and select the Web API project template. The project template creates an example API controller named ValuesController. The template also creates the API help pages. All of the code files for the help page are placed in the Areas folder of the project.


Continue reading Creating API Help Pages

Bing Maps in an MVC Application

Here is a simple example of how to use Bing Maps in an MVC application.

I am using Bing Maps V8 which is the current version of Microsoft.

Also, nothing that document.ready will fire long before the map script loads as it loads asynchronously.  Sometimes document.ready will fire before the page is loaded which means the map div might not even be available. To overcome this, we are using the callback parameter of the map script UR: for example:

http://www.bing.com/api/maps/mapcontrol?callback=LoadMap
Continue reading Bing Maps in an MVC Application