Wednesday, June 19, 2013

Upgrade Orchard 1.3 site from MVC3 (VS2010) to MVC4 (VS2012)

  1. Uses NuGet Package to install MVC4 into the project
  2. Manually change Rozer and MVC assembly configuration in the Web.Config files from old version to version 2 and 4. Add to Web.Config in each View folder of the project.
    1. <configuration>

      <system.web.webPages.razor>
              <host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
              <pages pageBaseType="Orchard.Mvc.ViewEngines.Razor.WebViewPage">
                  <namespaces>
                      <add namespace="System.Web.Mvc" />
                      <add namespace="System.Web.Mvc.Ajax" />
                      <add namespace="System.Web.Mvc.Html" />
                      <add namespace="System.Web.Routing" />
                      <add namespace="System.Linq"/>
                      <add namespace="System.Collections.Generic"/>
                      <add namespace="Orchard.Mvc.Html"/>
                  </namespaces>
              </pages>
          </system.web.webPages.razor>

      </configuration>

  3. Remove “@” if it is in and “@{}” block.
  4. Replace “jQueryUtils_TimePicker”

Sunday, June 16, 2013

Javascript scope in HTML page which contains iframe

If a HTML page contains a “iframe”, what is the relationship between the javascripts in the two HTML pages in terms of function/variable scope?