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
Post a Comment