Guest User

Untitled

a guest
Aug 14th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. Getting Content from a specific ActionResult based on a string?
  2. <footer>
  3. @{
  4. ContentArea r = new ContentArea("Footer");
  5. }
  6. @r.print()
  7. </footer>
  8.  
  9. /Controllers/Modules/Gallery/
  10. /Models/Modules/Gallery/
  11. /View/Modules/Gallery/
  12.  
  13. ID Module(varchar)
  14. 1 Gallery
  15. 2 Newsletter
  16.  
  17. class ContentArea {
  18. .......
  19. Public String Print() {
  20. string areaContent = "";
  21. foreach row in my table {
  22. areaContent += //And here it should load the output of a controller actionresult
  23. //Based on the Module string from my database
  24. }
  25. }
  26. }
Add Comment
Please, Sign In to add comment