когда получите ajax данные из URL, тогда я хочу показать данные в Html форме
Json данных
[
{
"Buildings": {
"Campuses": {
"ID": 3,
"Campus_Name": "Dhaka"
},
"ID": 9,
"Building_Name": "D",
"CampusID": 3
},
"Campuses": {
"ID": 3,
"Campus_Name": "Dhaka"
},
"ID": 17,
"Floor_Name": "1st",
"CampusID": 3,
"BuildingID": 9
}
]
Html
<form id="form">
@Html.TextBoxFor(m => m.ID, new { @id = "Floor_ID", @class = "form-control", @placeholder = "Floor_ID**" })
<div class="form-group">
@Html.LabelFor(model => model.Floor_Name, htmlAttributes: new { @class = "col-form-label" })
@Html.TextBoxFor(m => m.Floor_Name, new { @id = "FloorName", @class = "form-control", @placeholder = "Name*" })
</div>
<div class="form-group">
@Html.LabelFor(model => model.CampusID, htmlAttributes: new { @class = "col-form-label" })
@Html.DropDownListFor(m => m.CampusID, ViewBag.CampusID as SelectList, new { @class = "form-control", @id = "CampusID" })
</div>
<div class="form-group">
@Html.LabelFor(model => model.BuildingID, htmlAttributes: new { @class = "col-form-label" })
<select id="BuildingID" name="BuildingID" class="form-control">
<option value="" >---Select---</option>
</select>
</form>