Skip to content Skip to sidebar Skip to footer

Variables Contain Values But In Action They Equals Null

I have the following js code: $('#dateRange').change(function() { var date = $(this).attr('value'); var test = '1'; var eventId = $('div.movie

Solution 1:

Might be some parameter contain white spaces.

Check that cause I have faced same problem day before yesterday..

Solution 2:

for dayRange you may want to use $("#selectdayRange").text()

you may also need to encodeURIComponent($("#selectdayRange").text()); in order to be able to insert a query parameter.

Solution 3:

Try removing the /

$("#scheduleList").load("/EventSchedule/GetSchedule?date=" + date ...

If you've never fiddled with your Global.asax file, by default, URLs route to {controller}/{action}/{id}.

I would recommend using a ViewModel to pass your data, however, since you are using MVC.

Post a Comment for "Variables Contain Values But In Action They Equals Null"