private static string Domain_DataCode_This() { var queryData = VotePage.GetQueryString("Data").ToUpperInvariant(); if (!string.IsNullOrEmpty(queryData)) { return(queryData); } var queryState = VotePage.QueryState; return(!string.IsNullOrEmpty(queryState) ? queryState : UrlManager.CurrentDomainDataCode); }
public static void ServeImagePage(VotePage votePage) { var politicianKey = VotePage.QueryId; var column = VotePage.GetQueryString("Col"); if (IsNullOrWhiteSpace(column)) { column = "Profile300"; } // Set &Def=ColumnName to show the NoPhoto if requested image is missing // and to use the ColumnName for the size. If Def= is present but the // column name is invalid, the columnName from Col= will be used var defaultColumn = VotePage.GetQueryString("Def"); // Include <NoCacheParameter>=1 (meaning nocache=true) to force the image to be be served // from the common server to avoid cache invalidation latency. This should // ONLY be used on master and admin maintenance forms. // Use the NoCacheParameter property so we can change the value if need be. var noCacheParameter = VotePage.GetQueryString(VotePage.NoCacheParameter); int.TryParse(noCacheParameter, out var noCacheValue); var noCache = noCacheValue == 1 || votePage.NoCacheViaCookie; // Added 09/10/2012 to prevent serving an empty image if (IsNullOrWhiteSpace(defaultColumn)) { defaultColumn = column; } // Added 09/10/2012 -- we no longer serve Profile500 & Profile400 if (column == "Profile500" || column == "Profile400") { column = "Profile300"; } if (defaultColumn == "Profile500" || defaultColumn == "Profile400") { defaultColumn = "Profile300"; } ServePoliticianImage( politicianKey, column, defaultColumn, noCache); }