private void HandleCompareCandidatesPage() { var officeKey = string.Empty; var electionKey = MemCache.IsValidElection(GetQueryParm("Election")) ? GetQueryParm("Election") : FixElectionKeyFromQueryString(); if (!string.IsNullOrEmpty(electionKey)) { if (Offices.IsInElection(GetQueryParm("Office"), electionKey)) { officeKey = GetQueryParm("Office"); } } var stateCode = Elections.GetStateCodeFromKey(electionKey); if (!string.IsNullOrEmpty(electionKey) && !string.IsNullOrEmpty(officeKey)) { NormalizedUri = UrlManager.GetCompareCandidatesPageUri(stateCode, electionKey, officeKey); } else { ErrorMessage = "Cannot find this combination of State, Election and Office"; } }
protected void Page_Load(object sender, EventArgs e) { Response.RedirectPermanent( UrlManager.GetCompareCandidatesPageUri(DomainData.FromQueryStringOrDomain, QueryElection, QueryOffice) .ToString(), true); }
private void WriteCompareCandidatesPages() { foreach (var key in _CompareCandidatesPages.Keys.OrderBy(key => key)) { WriteUrl(UrlManager.GetCompareCandidatesPageUri(key.String1, key.String2)); } }