protected static string Subsitutions_Politician_Find(string politicianKey, string strToApplySubsitutions) { var newStr = strToApplySubsitutions; newStr = Regex.Replace(newStr, @"\[\[USERNAME\]\]", Politicians_Str(politicianKey, "PoliticianKey"), RegexOptions.IgnoreCase); newStr = Regex.Replace(newStr, @"\[\[PASSWORD\]\]", Politicians_Str(politicianKey, "Password"), RegexOptions.IgnoreCase); var stateCode = Politicians.GetStateCodeFromKey(politicianKey).ToUpper(); newStr = Regex.Replace(newStr, @"\[\[STATE\]\]", StateCache.GetStateName(stateCode), RegexOptions.IgnoreCase); newStr = Regex.Replace(newStr, @"\[\[VOTEXXANCHOR\]\]" //, db.Anchor(@"http://Vote-" + StateCode + ".org/") , Anchor(UrlManager.GetDefaultPageUri(stateCode)), RegexOptions.IgnoreCase); newStr = Regex.Replace(newStr, @"\[\[MGREMAIL\]\]", Anchor_Mailto_Email("*****@*****.**"), RegexOptions.IgnoreCase); newStr = Regex.Replace(newStr, @"\[\[INTROANCHOR\]\]" //, db.Anchor(@"http://Vote-" + StateCode + ".org/Intro.aspx?Id=" + db.Politicians_Str(PoliticianKey, "PoliticianKey")) , Anchor(UrlManager.GetIntroPageUri(politicianKey)), RegexOptions.IgnoreCase); newStr = Regex.Replace(newStr, @"\[\[POLITICIANENTRY\]\]" //, db.Anchor(@"http://Vote-" + StateCode + ".org/Politician") , Anchor(UrlManager.GetStateUri(stateCode) + "Politician"), RegexOptions.IgnoreCase); return(newStr); }
protected void Page_Load(object sender, EventArgs e) { Page.IncludeJs("http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"); Page.IncludeJs( "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"); Page.IncludeJs("~/js/vote.js"); Page.IncludeJs("~/js/donate.js"); Page.IncludeCss("~/js/jq/jquery-ui.css"); Page.IncludeCss("~/css/MainNavigation.css"); DonateLink.HRef = VotePage.DonateUrl; if (!IsPostBack) { if (!string.IsNullOrEmpty(UrlManager.CurrentQuerySiteId)) { var stateCode = UrlManager.FindStateCode(); HomeLink.HRef = UrlManager.GetDefaultPageUri(stateCode) .ToString(); ForVotersLink.HRef = UrlManager.GetForVotersPageUri(stateCode) .ToString(); ForCandidatesLink.HRef = UrlManager.GetForCandidatesPageUri(stateCode) .ToString(); ForVolunteersLink.HRef = UrlManager.GetForVolunteersPageUri(stateCode) .ToString(); } } }
protected void Page_Load(object sender, EventArgs e) { Page.IncludeCss("~/css/MainFooter.css"); if (!IsPostBack) { if (!string.IsNullOrEmpty(UrlManager.CurrentQuerySiteId)) { var stateCode = UrlManager.FindStateCode(); HomeLink.HRef = UrlManager.GetDefaultPageUri(stateCode) .ToString(); AboutUsLink.HRef = UrlManager.GetAboutUsPageUri(stateCode) .ToString(); ContactUsLink.HRef = UrlManager.GetContactUsPageUri(stateCode) .ToString(); PrivacyLink.HRef = UrlManager.GetPrivacyPageUri(stateCode) .ToString(); DonateLink.HRef = UrlManager.GetDonatePageUri(stateCode) .ToString(); ForVotersLink.HRef = UrlManager.GetForVotersPageUri(stateCode) .ToString(); ForCandidatesLink.HRef = UrlManager.GetForCandidatesPageUri(stateCode) .ToString(); ForVolunteersLink.HRef = UrlManager.GetForVolunteersPageUri(stateCode) .ToString(); ForPartersLink.HRef = UrlManager.GetForPartnersPageUri(stateCode) .ToString(); ForPoliticalPartiesLink.HRef = UrlManager.GetForPoliticalPartiesPageUri(stateCode) .ToString(); ForResearchLink.HRef = UrlManager.GetForResearchPageUri(stateCode) .ToString(); ForElectionAuthoritiesLink.HRef = UrlManager.GetForElectionAuthoritiesPageUri(stateCode) .ToString(); } } }