Server error! Check the console for details :(

Node and upgrading a site to the new PR code

First of all, you may be asking, what is Node and why do we need to update the PR code?

Node

Node is the server language that all of our new sites are served under, and old sites will be migrated towards. When you hit Control + F5 on Visual Studio / Web Developer, you're running an ASP.NET server to display the site. When a site is on the node server, you should really be verifying that the site looks right under node rather than ASP.NET.

The vast majority of the time, the site will look the same in ASP.NET as it will in Node, so most of the time it isn't that big of a deal. However, the pr..js file that we will be discussing below will NOT run on ASP.NET. When you try, you will see this error (and a hopefully read the helpful comment telling you to run it in Node instead):

Compilation error from ASP.NET

How to run node on your work box

Send to .node.bat

pr..js user control

Here is the new file (pr..js)

This file, pr..js (yes two periods) replaces the pr.ascx and pr.ascx.cs files and is referenced just like any other user control file, it just has a different name. For example:

<%@ Register Src="/pr..js" TagPrefix="uc" TagName="pr" %>

You reference it on the page exactly the same as before.

<uc:pr Path="/pdf/pr/current/" ItemLimit="3" List="div" Item="" Item_Date="div" ListClass="pr" Header="h6" Item_Name="" DateFormat="MMMM yyyy " LinkSymbol="" />

Visual Studio / Web Developer won't recognize the ..js extension, so will complain that the element 'pr' is not a known element. Disregard this error.

If the file starts with 6 numbers followed by a space, then those numbers will be transformed into a date; the numbers must be in the format YYYYMM.

Here are some of the variables that may be applied to the press release user control (case sensitive):