Advertisement
Guest User

Untitled

a guest
Jun 16th, 2015
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. themes = db.Themes.ToList();
  2.  
  3. foreach (var item in themes)
  4. {
  5. if (item.themeImage != null)
  6. {
  7. string imageBase = Convert.ToBase64String(item.themeImage);
  8. imageSource1 = string.Format("data:image/gif;base64,{0}", imageBase);
  9. }
  10.  
  11. if (theme == beach && item.themeID == 1)
  12. {
  13. <text>
  14. <div class="jumbotron" id="@item.themeID" img src="@item.themeImage">
  15. </text>
  16.  
  17.  
  18. }
  19.  
  20. else if (theme == animals && item.themeID == 2)
  21. {
  22. <text>
  23. <div class="jumbotron" id="@item.themeID" style="background-image:@imageSource1; background-size:cover">
  24. </text>
  25. }
  26.  
  27. else if (theme == kitchen && item.themeID == 3)
  28. {
  29. <text>
  30. <div class="jumbotron" id="@item.themeID" style="background-image:@imageSource1; background-size:cover">
  31. </text>
  32. }
  33. }
  34.  
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement