Clear        


                
                    @model CityRequest

@* Generated from Custom MVC Template. *@
@* Model namespace using directive should be added to _ViewImports.cshtml. *@

@{
    var containerDivClass = "container"; // "container-fluid" can be used for full width
    var dateTimePickerClass = "datetimepicker"; // "jquery-datetimepicker" must be added as client side library
}
@{
    /*
    ViewBag and ViewData are the same collection (dictionary).
    They carry extra data other than the model from a controller action to its view, or between views.
    The value assigned will be shown in Views\Shared\_Layout.cshtml view's title tag of the head tag.
    */
    ViewData["Title"] = "City Create";
}

<div class="@containerDivClass">
    <h1>@ViewData["Title"]</h1>
    <hr />
</div>

<div class="@containerDivClass">
    @if (TempData["Message"] is not null)
    {
    /*
    TempData is used to carry extra data to the redirected controller action's view.
    */
    <p class="text-danger">
        @TempData["Message"]
    </p>
    }
    <form asp-action="Create" autocomplete="off" enctype="multipart/form-data">
		@Html.AntiForgeryToken()
        <div asp-validation-summary="All" class="text-danger"></div> @* Use ModelOnly instead of All to see only service response messages in validation summary *@
        <div class="row mb-3">
            <label asp-for="CityName" class="col-2 col-form-label fw-bold"></label>
			<div class="col-10">
			    <input asp-for="CityName" class="form-control" />
				<span asp-validation-for="CityName" class="text-danger"></span>
			</div>
        </div>
        <div class="row mb-3">
            <label asp-for="CountryId" class="col-2 col-form-label fw-bold"></label>
			<div class="col-10">
				<select asp-for="CountryId" class="form-select" asp-items="ViewBag.CountryId">
					<option value="">-- Select --</option>
				</select>
				<span asp-validation-for="CountryId" class="text-danger"></span>
			</div>
        </div>
        <div class="row mb-3">
            <label asp-for="FormFile" class="col-2 col-form-label fw-bold"></label>
            <div class="col-10">
                <input asp-for="FormFile" class="form-control" type="file" />
            </div>
        </div>

@* Can be uncommented and used for many to many relationships, "entity" may be replaced with the related entity name in the controller and views. *@
        @*
        <div class="row mb-3">
            <label asp-for="EntityIds" class="col-2 col-form-label fw-bold"></label>
	        <div class="col-10">
		        <select multiple asp-for="EntityIds" class="form-select" asp-items="ViewBag.EntityIds"></select>
		        <span asp-validation-for="EntityIds" class="text-danger"></span>
	        </div>
        </div>
        *@

        <hr />  
        <div class="row mb-3">
			<div class="offset-2 col-10">
                <button type="submit" class="btn btn-primary">Save</button>
				&nbsp;&nbsp;
                <button type="reset" class="btn btn-outline-primary">Reset</button>
				&nbsp;&nbsp;
				<a asp-action="Index">Back to List</a>
			</div>
        </div>
    </form>
</div>  

@section Scripts {
    @* Can be uncommented to use client-side validation using jQuery instead of server-side validation. *@
    @*<partial name="_ValidationScriptsPartial" />*@
}