@Html.DropDownListFor(model => model.Country, new SelectList(((System.Collections.IEnumerable)ViewData["CList"]), "cid", "cname"), "--Select--", new { @Class = "txtbox", onchange = "CountryChange()", id = "ddlcountry" })
function CountryChange() {
var dropdownSelect= document.getElementById("ddlcountry");
var selectedValue = dropdownSelect.options[dropdownSelect.selectedIndex].value;
var selectedText = dropdownSelect.options[dropdownSelect.selectedIndex].text;
}
No comments:
Post a Comment