Hi all:
I have created a function for load event like this:
$(function() {
$('#dvGames').load(
'<%= Url.Action("Partial3", "LiveGame") %>',{ gameDate: '2011-03-06' }
);
});
and it works. Also, I have created a function for date change like this:
$(function() {
$('#datepicker').datepicker({
onSelect: function(dateText, inst) {
$.ajax({
type: "POST",
url: "/LiveGame/Partial3",
data: "gameDate=" + dateText,
success: function(result) {
alert(result);
var domElement = $(result); // create element from html
$("#dvGames").append(domElement); // append to end of list
}
});
}
});
});
but it doesnt work. neither it goes in controller action. My controller action is:
public ActionResult Partial3(string gameDate)
{
return PartialView("Partial3");
}
Please suggest me solution to this.