can i have a date in the url of a route in asp.net ?
- by oo
This code below doesn't seem to work but i can't figure out why. If i have a user entered textbox that is a datepicker and the results are displayed as:
21-May-2010
, can i take this value and stick it into a URL to send over to a controller action so instead of an id (which is an int), i want a id which is a date value
View / Javascript Code:
$.get('/Tracker/DailyBlog/' + this.val(), function(data) {
$('#dailyblog').html(data);
});
ControllAction Code:
public ActionResult DailyBlog(DateTime blogDate)
{
//go do something
}
any idea why this is not working ?