TrendChartTemplate.cs 709 B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using System.Linq;
  5. using System.Web;
  6. namespace CB.TVTrendChartData
  7. {
  8. public class TrendChartTemplate
  9. {
  10. public static string GetTrendChartTemplate(string url)
  11. {
  12. string path = AppDomain.CurrentDomain.BaseDirectory + "TemplatePageRoot\\" + url;
  13. try
  14. {
  15. if (File.Exists(path))
  16. {
  17. return File.ReadAllText(path);
  18. }
  19. else
  20. {
  21. return "";
  22. }
  23. }
  24. catch (Exception e)
  25. {
  26. return "";
  27. }
  28. }
  29. }
  30. }