I am posting a code snippet .in this I want to turn the label unvisible upon change of radiobutton list selection.
While the dropdownlist are hiding properly , the label is not hiding .
Please let me know the reason why ?
@Html.BeginForm()
@Html.Label("PO Transfer")
| @Html.Label("Select Method") | @Html.RadioButton("rbGrp","1", isChecked:true)@Html.Label("Country") @Html.RadioButton("rbGrp", "2", isChecked: false)@Html.Label("Physician") @Html.RadioButton("rbGrp", "3", isChecked: false)@Html.Label("PO") |
| @Html.Label("dropCountry","Country") | @Html.DropDownList("dropCountry", Model.CountryList, new { @style = "display:visible;" }) @Html.ValidationMessage("dropCountry") |
| @Html.Label("dropPhysician","Physician") | @Html.DropDownList("dropPhysician", Model.PhysicianList, new { @style = "display:none;" }) @*@Html.DropDownListFor(m => m.PhysicianList, new SelectList(Model.GetPhysicianList(), "Value", "Text", -1))*@ |
| @Html.Label("dropPO","PO") | @Html.DropDownList("dropPO", Model.POList, new { @style = "display:none;" }) @*@Html.DropDownListFor(m => m.POList, new SelectList(Model.GetPOList(), "Value", "Text", -1))*@ |
| @Html.Label("dropToPO","To PO") | @Html.DropDownList("dropToPO", Model.POList, new { @style = "display:visible;" }) @*@Html.DropDownListFor(m => m.POList, new SelectList(Model.GetPOList(), "Value", "Text", -1))*@ |
Shuvojit HalderPosted Jun 29, 2015, 3:22 AM