daily pastebin goal
35%
SHARE
TWEET

Untitled

a guest Mar 18th, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public int ID { get; set; }
  2.  
  3.     [Required]
  4.     [Display(Name = "Titulo del articulo")]
  5.     public string Titulo { get; set; }
  6.  
  7.     [Required]
  8.     [Display(Name = "Contenido del articulo")]
  9.     [MaxLength(450)]
  10.     [AllowHtml]
  11.     public string Contenido { get; set; }
  12.  
  13.     [Required]
  14.     [Display(Name = "Descripcion del articulo")]
  15.     [MaxLength(150)]
  16.     public string Descripcion { get; set; }
  17.  
  18.     [DisplayFormat(DataFormatString = "{0:d}")]
  19.     public DateTime FechaCreacion { get; set; }
  20.  
  21.     public bool Activo { get; set; }
  22.      
  23. public ActionResult Article(int id)
  24.         {
  25.             ArticleService articleService = new ArticleService();
  26.             var model = articleService.GetArticle(id);
  27.             return View(model);
  28.         }
  29.      
  30. @model Entidades.Article
  31. @{
  32.     ViewBag.Title = Model.Titulo;
  33. }
  34. <!-- Page Header -->
  35. <header class="masthead" style="background-image: url('img/post-bg.jpg')">
  36.     <div class="overlay"></div>
  37.     <div class="container">
  38.         <div class="row">
  39.             <div class="col-lg-8 col-md-10 mx-auto">
  40.                 <div class="post-heading">
  41.                     <h1>@Model.Titulo</h1>
  42.                     <h2 class="subheading">@Model.Descripcion</h2>
  43.                     <span class="meta">
  44.                         Escrito por
  45.                         <a href="@Url.Action("Index", "Blog")">Inicio</a>
  46.                         @Model.FechaCreacion.ToShortDateString()
  47.                     </span>
  48.                 </div>
  49.             </div>
  50.         </div>
  51.     </div>
  52. </header>
  53. <!-- Post Content -->
  54. <article>
  55.     <div class="container">
  56.         <div class="row">
  57.             <div class="col-lg-8 col-md-10 mx-auto">
  58.                <p>@Model.Contenido</p>
  59.             </div>
  60.         </div>
  61.     </div>
  62. </article>
  63. <hr>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top