MovieBase_Project/MovieBase/Views/Search/Index.cshtml
2019-05-29 21:33:34 +02:00

35 lines
1.0 KiB
Plaintext

@model MovieBase.Models.Movie
@{
//ViewBag.Title = "Index";
Layout = "~/Views/Shared/_Layout.cshtml";
}
<h2>Search</h2>
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery-3.3.1.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.js")"></script>
@using (Ajax.BeginForm("Search", "Search", new AjaxOptions { HttpMethod = "GET", UpdateTargetId = "details" }))
{
<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" })
</div>
</div>
<input type="submit" value="Search" class="btn btn-primary col-lg-offset-2" />
</div>
}
<br>
<div id="details">
@{
Html.RenderPartial("Search", Model);
}
</div>
@section Scripts {
@Scripts.Render("~/bundles/jqueryval")
}