Guest User

Untitled

a guest
Aug 30th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. @model MyMVCApp.Models.Post
  2. @{
  3. ViewBag.Title = "Details";
  4. Layout = "~/Views/Shared/_Layout.cshtml";
  5. }
  6.  
  7. <h2>Info</h2>
  8.  
  9. <h3>@Model.Title</h3>
  10.  
  11. <p>@Model.Created</p>
  12. <p>@Model.Description</p>
  13. <p>Author: @Model.Author</p>
  14.  
  15. [Timestamp]
  16. public byte[] Created_at { get; set; }
  17. public string Created
  18. {
  19. get
  20. {
  21. return Convert.ToBase64String(Created_at);
  22. }
  23. }
  24.  
  25. Сообщение об ошибке компилятора: CS1061: 'Post' does not contain a definition for 'Created' and no extension method 'Created' accepting a first argument of type 'Post' could be found (are you missing a using directive or an assembly reference?)
  26.  
  27. Ошибка источника:
  28.  
  29.  
  30. Строка 9: <h3>@Model.Title</h3>
  31. Строка 10:
  32. Строка 11: <p>@Model.Created</p> //тут
  33. Строка 12: <p>@Model.Description</p>
  34. Строка 13: <p>Author: @Model.Author</p>
Add Comment
Please, Sign In to add comment