2019-05-05 21:59:25 +02:00
|
|
|
@model MovieBase.Models.Movie
|
|
|
|
@{
|
|
|
|
//ViewBag.Title = "Index";
|
|
|
|
Layout = "~/Views/Shared/_Layout.cshtml";
|
|
|
|
}
|
|
|
|
|
|
|
|
<h2>Index</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 = "Post", UpdateTargetId = "details" }))
|
|
|
|
{
|
|
|
|
<p>
|
|
|
|
@Html.ValidationMessageFor(model => model.Title)
|
2019-05-06 23:20:26 +02:00
|
|
|
<br />
|
|
|
|
Find in IMDB database @Html.EditorFor(model => model.Title)
|
|
|
|
|
2019-05-05 21:59:25 +02:00
|
|
|
<input type="submit" value="Search" />
|
|
|
|
</p>
|
|
|
|
}
|
|
|
|
<br>
|
|
|
|
<div id="details">
|
|
|
|
@{
|
|
|
|
Html.RenderPartial("Search", Model);
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@section Scripts {
|
|
|
|
@Scripts.Render("~/bundles/jqueryval")
|
|
|
|
}
|