jquery - how to pass value to an action in mvc? -


i trying build event calendar. in have written gatedate function returns date of respective clicked field calendar have created. want pass date index action please me.

function getdate() {                  $('.cal_daybox').on('click', function () {                     var timestamp = parseint($(this).attr('id'));                     var day = new date(timestamp);                     alert("you clicked " + day.todatestring());                   });             } 

thank you.

put date in hiddenfield , make function redirect user index action.

eg.

function gotoindex() {     var _date = $('#hiddenfield').val();     document.href = '/home/index/?date=' + _date; } 

Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -