I have a DropDownList that holds different company offices.
<div class="form-group">
<label for="Branch">Branch</label>
@Html.DropDownListFor(model => model.Branch,
new List<SelectListItem> {
new SelectListItem { Value = "Office 1" , Text = "Office 1" },
new SelectListItem { Value = "Office 2" , Text = "Office 2" },
new SelectListItem { Value = "Office 3" , Text = "Office 3" },
}, "Choose",
new { @class = "form-control", id ="Branch" })
</div>
Depending on which office is chosen, I'd like to load the address in to the rest of the form, which are just textboxes like:
<div class="form-group">
<label for="Delivery_Address_Line1">Delivery Address</label>
<input type="text" class="form-control" id="Delivery_Address_Line1" placeholder="">
</div>
<div class="form-group">
<label for="Delivery_Address_Line2">Address 2</label>
<input type="text" class="form-control" id="Delivery_Address_Line2" placeholder="">
</div>
<div class="form-group">
<label for="Delivery_Address_Town">City/Town</label>
<input type="text" class="form-control" id="Delivery_Address_Town">
</div>
How can I do this? Thanks.