Guest User

Untitled

a guest
Jul 21st, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. @section toolbar {
  2. <div class="tool">
  3. <div class="row">
  4. @Html.ActionLink( Resources.Strings.Edit, "Edit", "Profile" )
  5. </div>
  6. <div class="row">
  7. @Html.ActionLink( Resources.Strings.Delete, "Delete", "Profile" )
  8. </div>
  9. </div >
  10. }
  11.  
  12. @if (!Model.ReadOnly)
  13. {
  14. <text>
  15. @section toolbar {
  16.  
  17. }
  18. </text>
  19. }
  20.  
  21. @if(!Model.ReadOnly)
  22. {
  23. @Html.Partial("toolbar")
  24. }
  25.  
  26. @section SomeSection {
  27. @if (!Model.ReadOnly)
  28. {
  29.  
  30. }
  31. }
  32.  
  33. @Html.Partial("MyAction)
  34.  
  35. public PartialViewResult MyAction()
  36. {
  37. ...
  38.  
  39. // determine readonly status - could have passed this to the action I suppose
  40. if (ReadOnly)
  41. {
  42. return PartialView("TheOneThatDefinesTheSection");
  43. }
  44. else
  45. {
  46. return PartialView("TheOneThatDoesNotDefineTheSection");
  47. }
  48. }
Add Comment
Please, Sign In to add comment