Advertisement
Guest User

Untitled

a guest
Dec 18th, 2015
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.37 KB | None | 0 0
  1. @model my_photos.Models._partial
  2. @{
  3. Layout = null;
  4. }
  5. <!DOCTYPE html>
  6.  
  7. <html>
  8. <head>
  9. <meta name="viewport" content="width=device-width" />
  10. <title>_Layout</title>
  11. <link href="@Url.Content("~/Content/Style/Site.css")" rel="stylesheet" type="text/css" />
  12. <link href="@Url.Content("~/Content/Style/Side_barnav.css")" rel="stylesheet" type="text/css" />
  13.  
  14.  
  15. </head>
  16. <body>
  17. <header>
  18. <h3> Photos app</h3>
  19. <p> In this app my major concerns are with the <strong>theaming</strong>!</p>
  20. <div class="nav">
  21. <ul class="main-menu">
  22. <li>@Html.ActionLink("Home","Index", "Default")</li>
  23. <li>@Html.ActionLink("About","About", "Default")</li>
  24. <li>@Html.ActionLink("Contact","Contact", "Default")</li>
  25. </ul>
  26. </div>
  27. </header>
  28. <section>
  29. @RenderBody()
  30. @Html.Partial("~/Views/Shared/_partial.cshtml", Model)
  31. </section>
  32. <footer>
  33. <div class="fotter-menu">
  34. <ul>
  35. <li>@Html.ActionLink("Home","Index","Default")</li>
  36. <li>@Html.ActionLink("About","About","Default")</li>
  37. <li>@Html.ActionLink("Contact","Contact","Default")</li>
  38. </ul>
  39. <ul>
  40. <li>@Html.ActionLink("Resources","Resources","Default")</li>
  41. <li>@Html.ActionLink("Testimonial","Testimonial","Default")</li>
  42. <li>@Html.ActionLink("Team","Team","Default")</li>
  43. </ul>
  44. <ul>
  45. <li>@Html.ActionLink("Home","Index","Default")</li>
  46. <li>@Html.ActionLink("Home","Index","Default")</li>
  47. <li>@Html.ActionLink("Home","Index","Default")</li>
  48. </ul>
  49. </div>
  50. </footer>
  51. </body>
  52. </html>
  53.  
  54. and here is my main controller file.
  55.  
  56. using System;
  57. using System.Collections.Generic;
  58. using System.Linq;
  59. using System.Web;
  60. using System.Web.Mvc;
  61. using my_photos.Models;
  62.  
  63.  
  64. namespace my_photos.Controllers
  65. {
  66. public class DefaultController : Controller
  67. {
  68.  
  69.  
  70. public ActionResult Index()
  71. {
  72. ViewBag.Massage = "Hello Word";
  73. var Profile = new profile() {
  74. name = "Aston",
  75. father_name = "Johan Deoh",
  76. address = " XYZ XYZ XYZ XYZ",
  77. Phone = "123123123",
  78. age = 22
  79. };
  80.  
  81. return View(Profile);
  82. }
  83. public ActionResult About() {
  84.  
  85. var aboutus = new about() {
  86. Us = "this is all i got by the way"
  87. };
  88. return View(aboutus);
  89. }
  90.  
  91.  
  92. public ActionResult _partial()
  93. {
  94. var model = new _partial() {
  95. Winner = "Shafee Jan"
  96. };
  97. return PartialView("_partial",model);
  98. }
  99.  
  100. }
  101. }
  102.  
  103. @model my_photos.Models.about
  104.  
  105. @{
  106. ViewBag.Title = "About";
  107. }
  108.  
  109.  
  110. <div class="content-container clear-fix">
  111. <h1 class="heading-width">About-Page</h1>
  112. <p class="paragraph">
  113. @Model.Us
  114. </p>
  115. </div>
  116.  
  117. @model my_photos.Models.profile
  118. @{
  119. ViewBag.Title = "Index";
  120.  
  121.  
  122. }
  123.  
  124. <div class="content-container clear-fix">
  125. <h1 class="heading-width">Names </h1>
  126. <ul>
  127. <li> name @Model.name.ToString()</li>
  128. <li> father name: @Model.father_name.ToString()</li>
  129.  
  130. </ul>
  131.  
  132. </div>
  133.  
  134. // partial model
  135. using System;
  136. using System.Collections.Generic;
  137. using System.Linq;
  138. using System.Web;
  139.  
  140. namespace my_photos.Models
  141. {
  142. public class _partial
  143. {
  144. public string Winner { get; set; }
  145. }
  146. }
  147.  
  148.  
  149.  
  150. //about models
  151. using System;
  152. using System.Collections.Generic;
  153. using System.Linq;
  154. using System.Web;
  155.  
  156. namespace my_photos.Models
  157. {
  158. public class about
  159. {
  160. public string Us { get; set; }
  161. }
  162. }
  163. // profile
  164. using System;
  165. using System.Collections.Generic;
  166. using System.Linq;
  167. using System.Web;
  168.  
  169. namespace my_photos.Models
  170. {
  171. public class profile
  172. {
  173. public String name { get; set; }
  174. public String father_name { get; set; }
  175. public String Phone { get; set; }
  176. public String address { get; set; }
  177. public String Status { get; set; }
  178. public int age { get; set; }
  179. }
  180. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement