mirror of
https://github.com/rudollee/LearningMVC.git
synced 2026-08-11 16:32:55 +00:00
Primitive Commit
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<link href="~/Content/bootstrap.css" rel="stylesheet" />
|
||||
<link href="~/Content/bootstrap-theme.css" rel="stylesheet" />
|
||||
<title>Index</title>
|
||||
<style>
|
||||
.btn a {color: white; text-decoration: none;}
|
||||
body{ background-color: #f1f1f1;}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="text-center">
|
||||
@*@ViewBag.Greeting World (from the view)*@
|
||||
<h2>We're going to have an exciting party.<br /></h2>
|
||||
<h3>And you are invited</h3>
|
||||
<div class="btn btn-success">
|
||||
@Html.ActionLink("RSVP Now", "RsvpForm")
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,61 @@
|
||||
@model PartyInvites.Models.GuestResponse
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<link href="~/Content/bootstrap.css" rel="stylesheet" />
|
||||
<link href="~/Content/bootstrap-theme.css" rel="stylesheet" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<link rel="stylesheet" type="text/css" href="~/Content/styles.css" />
|
||||
<title>RsvpForm</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="panel panel-success">
|
||||
<div class="panel-heading text-center">
|
||||
<h4>RSVP</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
@using (Html.BeginForm())
|
||||
{
|
||||
@Html.ValidationSummary()
|
||||
<div class="form-group">
|
||||
<label>Your name:</label>
|
||||
@Html.TextBoxFor(x => x.Name, new { @class = "form-control" })
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Your email</label>
|
||||
@Html.TextBoxFor(x => x.Email, new { @class = "form-control" })
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Your email: </label>
|
||||
@Html.TextBoxFor(x => x.Email, new { @class = "form-control" })
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Your phone:</label>
|
||||
@Html.TextBoxFor(x => x.Phone, new { @class = "form-control" })
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Will you attend?</label>
|
||||
@Html.DropDownListFor(x => x.WillAttend, new[]
|
||||
{
|
||||
new SelectListItem() {Text = "Yes, I'll be there", Value = bool.TrueString},
|
||||
new SelectListItem() {Text = "No, I can't come", Value = bool.FalseString}
|
||||
|
||||
}, "Choose an option", new { @class = "form-control" })
|
||||
</div>
|
||||
|
||||
<div class="text-center">
|
||||
<input class="btn btn-success" type="submit" value="Submit RSVP" />
|
||||
</div>
|
||||
|
||||
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,36 @@
|
||||
@model PartyInvites.Models.GuestResponse
|
||||
|
||||
@{
|
||||
Layout = null;
|
||||
}
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<link href="~/Content/bootstrap.css" rel="stylesheet" />
|
||||
<link href="~/Content/bootstrap-theme.css" rel="stylesheet" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<title>Thanks</title>
|
||||
<style>
|
||||
body {
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="text-center">
|
||||
<h1>Thank you, @Model.Name!</h1>
|
||||
<div class="lead">
|
||||
@if (Model.WillAttend == true)
|
||||
{
|
||||
@:It's great that you're coming. The drinks are already in the fridge!
|
||||
}
|
||||
else
|
||||
{
|
||||
@:Sorry to hear that you cant't make it, but thanks for letting us know.
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
|
||||
<system.web.webPages.razor>
|
||||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
<pages pageBaseType="System.Web.Mvc.WebViewPage">
|
||||
<namespaces>
|
||||
<add namespace="System.Web.Mvc" />
|
||||
<add namespace="System.Web.Mvc.Ajax" />
|
||||
<add namespace="System.Web.Mvc.Html" />
|
||||
<add namespace="System.Web.Routing" />
|
||||
<add namespace="PartyInvites" />
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web.webPages.razor>
|
||||
|
||||
<appSettings>
|
||||
<add key="webpages:Enabled" value="false" />
|
||||
</appSettings>
|
||||
|
||||
<system.webServer>
|
||||
<handlers>
|
||||
<remove name="BlockViewHandler"/>
|
||||
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
|
||||
</handlers>
|
||||
</system.webServer>
|
||||
|
||||
<system.web>
|
||||
<compilation>
|
||||
<assemblies>
|
||||
<add assembly="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
|
||||
</assemblies>
|
||||
</compilation>
|
||||
</system.web>
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user