I have created a view which contains both Javascript and functions as shown:
@functions
{
public int DaysInMonth(string Month)
{
//code to get the no of days in month;
}
}
I have drop down list that contains month.. Now I want to write code on dropdownlist's change event using jQuery which will call the above function.
<script type="text/javascript">
$(function () {
$('#Months').live('change', function () {
//code to call the above function
});
});
</script>
Here ('#Months') is the id of the dropdownlist..
Note: Both the above code snippets are in the same view (Index).
How can i link the above two code snippets??
Thank you..