Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @model my_photos.Models._partial
- @{
- Layout = null;
- }
- <!DOCTYPE html>
- <html>
- <head>
- <meta name="viewport" content="width=device-width" />
- <title>_Layout</title>
- <link href="@Url.Content("~/Content/Style/Site.css")" rel="stylesheet" type="text/css" />
- <link href="@Url.Content("~/Content/Style/Side_barnav.css")" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <header>
- <h3> Photos app</h3>
- <p> In this app my major concerns are with the <strong>theaming</strong>!</p>
- <div class="nav">
- <ul class="main-menu">
- <li>@Html.ActionLink("Home","Index", "Default")</li>
- <li>@Html.ActionLink("About","About", "Default")</li>
- <li>@Html.ActionLink("Contact","Contact", "Default")</li>
- </ul>
- </div>
- </header>
- <section>
- @RenderBody()
- @Html.Partial("~/Views/Shared/_partial.cshtml", Model)
- </section>
- <footer>
- <div class="fotter-menu">
- <ul>
- <li>@Html.ActionLink("Home","Index","Default")</li>
- <li>@Html.ActionLink("About","About","Default")</li>
- <li>@Html.ActionLink("Contact","Contact","Default")</li>
- </ul>
- <ul>
- <li>@Html.ActionLink("Resources","Resources","Default")</li>
- <li>@Html.ActionLink("Testimonial","Testimonial","Default")</li>
- <li>@Html.ActionLink("Team","Team","Default")</li>
- </ul>
- <ul>
- <li>@Html.ActionLink("Home","Index","Default")</li>
- <li>@Html.ActionLink("Home","Index","Default")</li>
- <li>@Html.ActionLink("Home","Index","Default")</li>
- </ul>
- </div>
- </footer>
- </body>
- </html>
- and here is my main controller file.
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.Mvc;
- using my_photos.Models;
- namespace my_photos.Controllers
- {
- public class DefaultController : Controller
- {
- public ActionResult Index()
- {
- ViewBag.Massage = "Hello Word";
- var Profile = new profile() {
- name = "Aston",
- father_name = "Johan Deoh",
- address = " XYZ XYZ XYZ XYZ",
- Phone = "123123123",
- age = 22
- };
- return View(Profile);
- }
- public ActionResult About() {
- var aboutus = new about() {
- Us = "this is all i got by the way"
- };
- return View(aboutus);
- }
- public ActionResult _partial()
- {
- var model = new _partial() {
- Winner = "Shafee Jan"
- };
- return PartialView("_partial",model);
- }
- }
- }
- @model my_photos.Models.about
- @{
- ViewBag.Title = "About";
- }
- <div class="content-container clear-fix">
- <h1 class="heading-width">About-Page</h1>
- <p class="paragraph">
- @Model.Us
- </p>
- </div>
- @model my_photos.Models.profile
- @{
- ViewBag.Title = "Index";
- }
- <div class="content-container clear-fix">
- <h1 class="heading-width">Names </h1>
- <ul>
- <li> name @Model.name.ToString()</li>
- <li> father name: @Model.father_name.ToString()</li>
- </ul>
- </div>
- // partial model
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- namespace my_photos.Models
- {
- public class _partial
- {
- public string Winner { get; set; }
- }
- }
- //about models
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- namespace my_photos.Models
- {
- public class about
- {
- public string Us { get; set; }
- }
- }
- // profile
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- namespace my_photos.Models
- {
- public class profile
- {
- public String name { get; set; }
- public String father_name { get; set; }
- public String Phone { get; set; }
- public String address { get; set; }
- public String Status { get; set; }
- public int age { get; set; }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement