I have this drop down list:
<div class="form-group" id="businessEntitiesIdsLegal">
<label asp-for="BusinessEntityTypeId" class="control-label col-sm-4 col-lg-3" asp-show-required-charachter="true">Some label</label>
<div class="col-sm-5 col-md-4 col-lg-3">
<select asp-for="BusinessEntityTypeId" id="BusinessEntityTypeId" asp-items="Model.BusinessEntities" class="select2 select-block-level search">
<option value="@BaseViewModel.NotSelected">Choose something</option>
</select>
<span asp-validation-for="BusinessEntityTypeId" class="text-danger"></span>
</div>
</div>
and I would like to handle if its selected item with value=2 then to show this div (and also if item get changed, to hide the div):
@if(Model.BuyerTypeId == BuyerTypeEnum.Legal.Id)
{
<div class="form-group" id="foobar">
<label asp-for="Jbkjs" class="control-label col-sm-4 col-lg-3"></label>
<div class="col-sm-5">
<input asp-for="Jbkjs" type="text" class="form-control" maxlength="5">
<span asp-validation-for="Jbkjs" class="text-danger"></span>
</div>
</div>
}
How can I achieve this?