I am unable to validate below condition:
When user selects a dropdownlist(ddlLoanType) then user needs to select another two dropdownlist(ddlyear,ddlSection) for sure before click on submit button.
but if user enters a value in the textbox(ID,Name) then it is not mandatory to select the all dropdownlists(ddlLoanType,ddlYear,ddlSection).
If user selects a dropdownlist(ddlLoanTypes) then enters a value in textbox((ID,Name)) then it is not mandatory to select other two dropdownlists(ddlYear,ddlSection).
Any help is appreciated!!
<pre lang="c#">
@Html.DropDownListFor(model => model.LoanType, Model.LoanType, "Select", new { @class = "form-control", id = "ddlLoanType", placeholder = "Select" })
@Html.DropDownListFor(model => model.Year, new SelectList(listItems), "Select", new { @class = "form-control", id = "ddlYear" })
@Html.DropDownListFor(model => model.Sections, new SelectList(sectionLst), "Select", new { @class = "form-control", id = "ddlSection" })
@Html.TextBoxFor(model => model.ID, new { @class = "form-control", placeholder = "Enter ID...", id = "ID" })
@Html.TextBoxFor(model => model.name, new { @class = "form-control", placeholder = "Enter Name", id = "Name" })