I have a JavaScript function that I call in the onchange handler of the drop down list. If the selected dropdownlist value is "1", I want to call one function in codebehind. The following is a function in JavaScript:
function GetAdmissionType()
{
InitComponents();
var type="";
type=document.getElementById(dlAdmissionType.id).value;
document.getElementById(hdnAdmissionType.id).value=document.getElementById(dlAdmissionType.id).value;
if(type=="1")
{
}
}
If type 1, then I want to work with code in codebehind
public void LoadSemesters()
{
}
Can someone help calling a function in codebehind from JavaScript?
source
share