protected static bool IsValidBase64(string Data) { try { Convert.FromBase64String(Data); return true; } catch { return false; } }