Razor


Razor code can be used inside articles. Razor is processed server side, before article load.

Examples:

    
    /* Getting site alias context */ 
    var vSiteAliasContext = Appframe365.Web.Context.SiteAliasContext.ForHttpContext(System.Web.HttpContext.Current);
    /* Getting Article context */
    var vMainArticle = vSiteAliasContext.GetArticle(ArticleID);

     /* Getting ID from url/GET params /somerticle?ID=1234 */
    if (QueryString.Contains("ID")){
        //@ QueryString.RawValue - reads param
        //HttpUtility.HtmlDecode - escapes value from posible unsafe code
		vID = HttpUtility.HtmlDecode(@QueryString.RawValue("ID"));
        //vID = 1234
	}
    

Related articles

Placeholder "LocalizeWeb2016" failed