protected void Page_Load(object sender, EventArgs e) { SetupCanonicalUrls(DictionaryURL, DictionaryURL); GetDefinitionTerm(); ValidateCDRID(); DictionaryURL = this.DictionaryRouter.GetBaseURL(); DictionaryLanguage = PageAssemblyContext.Current.PageAssemblyInstruction.Language; DictionaryAppManager _dictionaryAppManager = new DictionaryAppManager(); DictionaryTerm dataItem = _dictionaryAppManager.GetTerm(Convert.ToInt32(CdrID), NCI.Web.Dictionary.DictionaryType.term, DictionaryLanguage, "v1"); if (dataItem != null && dataItem.Term != null) { ActivateDefinitionView(dataItem); currentItem = dataItem; // Web Analytics ************************************************* if (WebAnalyticsOptions.IsEnabled) { // Set analytics for definition view page load SetAnalytics(); } } else { termDictionaryDefinitionView.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { SetupCanonicalUrl(this.DictionaryRouter.GetBaseURL()); GetDefinitionTerm(); ValidateCDRID(); //For Genetics dictionary language is always English DictionaryLanguage = "en"; DictionaryAppManager _dictionaryAppManager = new DictionaryAppManager(); DictionaryTerm dataItem = _dictionaryAppManager.GetTerm(Convert.ToInt32(CdrID), NCI.Web.Dictionary.DictionaryType.genetic, DictionaryLanguage, "v1"); if (dataItem != null && dataItem.Term != null) { ActivateDefinitionView(dataItem); currentItem = dataItem; // Web Analytics ************************************************* if (WebAnalyticsOptions.IsEnabled) { // Set analytics for definition view page load SetAnalytics(); } PageInstruction.AddFieldFilter("browser_title", (name, data) => { data.Value = "Definition of " + dataItem.Term + " - NCI Dictionary of Genetics Terms"; }); } else { termDictionaryDefinitionView.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { string input_term; if (PageAssemblyContext.Current.DisplayVersion == DisplayVersions.Web) { urlArgs = Request.Url.Query.Substring(1); input_term = Strings.Clean(Request.Params["term"]); CdrID = Strings.IfNull(Strings.Clean(Request.Params["id"]), Strings.Clean(Request.Params["cdrid"])); AudienceType audience = GetAudienceType(Strings.Clean(Request.Params["version"])); DictionaryType dictionary = GetDictionaryType(Strings.Clean(Request.Params["dictionary"])); //load the definition DictionaryAppManager _dictionaryAppManager = new DictionaryAppManager(); DictionaryTerm dataItem = null; if (!string.IsNullOrEmpty(CdrID)) { CdrID = Regex.Replace(CdrID, "^CDR0+", "", RegexOptions.Compiled); // call appropriate method if dictionary type is known // the language is set to English = en by default if (dictionary == DictionaryType.Unknown) { dataItem = _dictionaryAppManager.GetTermForAudience(Convert.ToInt32(CdrID), dictionaryLanguage, "v1", audience); } else { dataItem = _dictionaryAppManager.GetTerm(Convert.ToInt32(CdrID), dictionary, dictionaryLanguage, "v1", audience); } } if (dataItem != null && dataItem.Term != null) { ActivateDefinitionView(dataItem); } else { phDefinition.Visible = false; phNoResult.Visible = true; } // Web Analytics ************************************************* WebAnalyticsPageLoad webAnalyticsPageLoad = new WebAnalyticsPageLoad(); webAnalyticsPageLoad.SetChannel("Dictionary of Cancer Terms"); webAnalyticsPageLoad.SetLanguage("en"); webAnalyticsPageLoad.AddEvent(WebAnalyticsOptions.Events.event11); // Dictionary Term view (event11) litOmniturePageLoad.Text = webAnalyticsPageLoad.Tag(); // Load page load script // End Web Analytics ********************************************* } }
protected void Page_Load(object sender, EventArgs e) { string input_term; if (PageAssemblyContext.Current.DisplayVersion == DisplayVersions.Web) { urlArgs = Request.Url.Query.Substring(1); input_term = Strings.Clean(Request.Params["term"]); CdrID = Strings.IfNull(Strings.Clean(Request.Params["id"]), Strings.Clean(Request.Params["cdrid"])); AudienceType audience = GetAudienceType(Strings.Clean(Request.Params["version"])); DictionaryType dictionary = GetDictionaryType(Strings.Clean(Request.Params["dictionary"])); if (Request.QueryString["language"] == "Spanish") { dictionaryLanguage = "es"; logoAnchor.HRef = "/espanol"; logoImage.Alt = "Instituto Nacional Del Cáncer"; logoImage.Src = "/publishedcontent/images/images/design-elements/logos/nci-logo-full-es.svg"; closeWindowText.InnerText = "Cerrar"; definitionLabel.Text = "Definición:"; } else { logoAnchor.HRef = "/"; logoImage.Alt = "National Cancer Institute"; logoImage.Src = "/publishedcontent/images/images/design-elements/logos/nci-logo-full.svg"; closeWindowText.InnerText = "Close Window"; definitionLabel.Text = "Definition:"; } //load the definition DictionaryAppManager _dictionaryAppManager = new DictionaryAppManager(); DictionaryTerm dataItem = null; if (!string.IsNullOrEmpty(CdrID)) { CdrID = Regex.Replace(CdrID, "^CDR0+", "", RegexOptions.Compiled); // call appropriate method if dictionary type is known if (dictionary == DictionaryType.Unknown) { dataItem = _dictionaryAppManager.GetTermForAudience(Convert.ToInt32(CdrID), dictionaryLanguage, "v1", audience); } else { dataItem = _dictionaryAppManager.GetTerm(Convert.ToInt32(CdrID), dictionary, dictionaryLanguage, "v1", audience); } } if (dataItem != null && dataItem.Term != null) { ActivateDefinitionView(dataItem); } else { phDefinition.Visible = false; phNoResult.Visible = true; } // Web Analytics ************************************************* WebAnalyticsPageLoad webAnalyticsPageLoad = new WebAnalyticsPageLoad(); if (dictionaryLanguage == "es") { webAnalyticsPageLoad.SetChannel("Diccionario de cancer (Dictionary of Cancer Terms)"); webAnalyticsPageLoad.SetLanguage("es"); } else { webAnalyticsPageLoad.SetChannel("Dictionary of Cancer Terms"); webAnalyticsPageLoad.SetLanguage("en"); } webAnalyticsPageLoad.AddEvent(WebAnalyticsOptions.Events.event11); // Dictionary Term view (event11) litOmniturePageLoad.Text = webAnalyticsPageLoad.Tag(); // Load page load script // End Web Analytics ********************************************* } }