Friday, May 30, 2014

2012 stuff, HTML5 shims

Modernizr adopted by Microsoft to deal with HTML 5 in pre-IE9.

Polyfill is what we called code to handle cross-browser issues with HTML5.

HTML5 shiv is a kind of shim.

WebSocket takes place of what apparently we called Comet but I had thought of just a form of AJAX. In any case, combine that with surfing on a tablet or phone, and might as well say sayonara to the Web As We Knew It.

Monday, May 19, 2014

Not your father's embedded code blocks

ASPX files (ASP.NET) now use many more prefixes for inline (aka embedded) code blocks.

<% ... %>
<%= ... %>
<%@ ... %>
<%# ... %>
<%$ ... %>
<%-- ... %>

And naturally they're difficult strings to Google for.
You should already know the equal sign is a shortcut for response.write, and the @ (at-sign) is for DIRECTIVES.
The complete list of directives, of which you should be familiar with the Page, is:
The ASP.NET page framework supports the following directives:
@ Page Defines page-specific attributes that are used by the ASP.NET page parser and compiler. Can be included only in .aspx files.
*This directive name can be used only in ASP.NET Web Form pages.

@ Control Defines control-specific attributes that are used by the ASP.NET page parser and compiler. Can be included only in .ascx files (user controls).
*This directive name can be used only in User Control files.

@ Import Explicitly imports a namespace into a page or into a user control.

@ Implements Declaratively indicates that a page or a user control implements a specified .NET Framework interface.

@ Register Associates aliases with namespaces and with class names. This enables user controls and custom server controls to be rendered when they are included in a requested page or user control.

@ Assembly Links an assembly to the current page during compilation. It makes all the assembly's classes and interfaces available for use on the page.

@ Master Identifies an ASP.NET master page.

@ WebHandler Identifies an ASP.NET IHttpHandler page.

@ PreviousPageType Provides a way to obtain strong typing against the previous page as accessed through the PreviousPage property.

@ MasterType Assigns a class name to the Master property of an ASP.NET page. Provides a way to create a strongly typed reference to the ASP.NET master page.

@ OutputCache Declaratively controls the output caching policies of a page or of a user control.

@ Reference Declaratively links a page or user control to the current page or user control.

The hash (number sign), # , is for data-binding expressions.

The dollar sign , $ , is for CONFIGURATION FILE, settings access, though Microsoft names this 'expression builder' usage.

Flashback: Where is Adventure Works sample database?

Many tutorials suppose you have a copy of Adventure Works SQL database at the ready. If not installed by default, it is not so easy to find anymore.
The latest link I have for it is:

Other links will take you to a page for SQL Server 2008 SR4, so just be sure to look for the download below it for Adventure Works.

The file is called:

Thursday, May 15, 2014

Where can I find System.Web.MVC dll in a system where MVC is installed?

The default folder would be like the following:

C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Stack 5\Packages\Microsoft.AspNet.Mvc.5.0.0\lib\net45\System.Web.Mvc.dll

C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 4\Assemblies\System.Web.Mvc.dll

C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 3\Assemblies\System.Web.Mvc.dll

C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 2\Assemblies\System.Web.Mvc.dll