私はプロジェクトで作業しており、データベースの Content/assets フォルダーに保存された画像のパスを保存したいと考えています。写真ピッカーとパスをテキストボックスに保存しますか? これが私の見解です:
@using (Html.BeginForm("Create", "Rooms", FormMethod.Get, new { @encType = "multipart/form-data" }))
{
<div class="editor-label">
@Html.Label("RoomNumber")
@Html.TextBox("RoomNumber")
</div>
<div class="editor-label">
@Html.Label("RoomType")
@Html.DropDownList("RoomType_id", new SelectList(Model.tip.AsEnumerable(), "RoomType_ID", "Room_Type"))
</div>
@Html.Label("Floor")
@Html.DropDownList("Floor_id", new SelectList(Model.etaj.AsEnumerable(), "Floor_ID", "Denumire"))
<div class="editor-label">
@Html.Label("NumberOfSpots")
@Html.TextBox("NumberOfSpots")
</div>
<div class="editor-label">
@Html.Label("Status")
@Html.TextBox("Status")
</div>
<div class="editor-label">
@Html.Label("Status")
@Html.TextBox("Status")
</div>
<div class="editor-label">
@Html.Label("AlbumArtUrl")
@Html.TextBox("AlbumArtUrl")
</div>