MovieBase_Project/MovieBase/Views/Search/Index.cshtml

35 lines
1.0 KiB
Plaintext
Raw Normal View History

2019-05-05 21:59:25 +02:00
@model MovieBase.Models.Movie
@{
//ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Layout.cshtml";
}
2019-05-14 01:13:48 +02:00
<h2>Search</h2>
2019-05-05 21:59:25 +02:00
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery-3.3.1.js")"></script>
2019-05-29 21:33:34 +02:00
2019-05-05 21:59:25 +02:00
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.js")"></script>
2019-05-29 21:33:34 +02:00
@using (Ajax.BeginForm("Search", "Search", new AjaxOptions { HttpMethod = "GET", UpdateTargetId = "details" }))
2019-05-05 21:59:25 +02:00
{
2019-05-29 21:33:34 +02:00
<div class="form-horizontal">
<div class="form-group">
@Html.LabelFor(model => model.Title, htmlAttributes: new { @class = "control-label col-md-2" })
<div class="col-md-10">
@Html.EditorFor(model => model.Title, new { htmlAttributes = new { @class = "form-control" } })
@Html.ValidationMessageFor(model => model.Title, "", new { @class = "text-danger" })
2019-05-29 21:33:34 +02:00
</div>
2019-05-14 01:13:48 +02:00
</div>
2019-05-29 21:33:34 +02:00
<input type="submit" value="Search" class="btn btn-primary col-lg-offset-2" />
2019-05-14 01:13:48 +02:00
</div>
2019-05-05 21:59:25 +02:00
}
<br>
<div id="details">
@{
Html.RenderPartial("Search", Model);
}
</div>
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}