次に示すように、Javascriptと関数の両方を含むビューを作成しました。
@functions
{
    public int DaysInMonth(string Month)
    {
         //code to get the no of days in month;
    }
}
月を含むドロップダウンリストがあります。次に、上記の関数を呼び出すjQueryを使用して、ドロップダウンリストの変更イベントにコードを記述します。
<script type="text/javascript">
    $(function () {
        $('#Months').live('change', function () { 
           //code to call the above function  
        });
    });
</script>
ここ('#Months') is the idにドロップダウンリストがあります。
注:上記のコードスニペットは両方とも同じビュー(インデックス)にあります。
上記の2つのコードスニペットをリンクするにはどうすればよいですか?
ありがとうございました..