private void SetupSampleAd() { SampleAd.Visible = false; ButtonDeleteAd.Visible = false; if (BannerAds.AdTypeStateCodeElectionKeyOfficeKeyExists("B", StateCode, Empty, Empty)) { SampleAd.Visible = true; ButtonDeleteAd.Visible = true; ImageLink.HRef = NormalizeUrl(BannerAds.GetAdUrl("B", StateCode, Empty, Empty)); AdImage.Src = Utility.GetAdjustedSiteUri("banneradimage", $"B.{StateCode}...{DateTime.UtcNow.Ticks}"); } }
private void SetupSampleAd() { SampleAd.Visible = false; ComparePageLink.Visible = false; ButtonDeleteAd.Visible = false; if (BannerAds.AdTypeStateCodeElectionKeyOfficeKeyExists("C", Empty, QueryElection, QueryOffice)) { SampleAd.Visible = true; ComparePageLink.Visible = true; ButtonDeleteAd.Visible = true; ImageLink.HRef = NormalizeUrl(BannerAds.GetAdUrl("C", Empty, QueryElection, QueryOffice)); AdImage.Src = Utility.GetAdjustedSiteUri("banneradimage", $"C..{QueryElection}.{QueryOffice}.{DateTime.UtcNow.Ticks}"); ComparePageLink.HRef = Utility.GetAdjustedSiteUri("CompareCandidates.aspx", $"election={QueryElection}&office={QueryOffice}"); } }