Given the following code:
using (var client = new WebClient())
{
string url = string.Concat(someUrl, "SomeControllerName/", currentId, "/WriteLogFile");
var toWrite = DateTime.Now
/* Code to post object to URL goes here e.g. client.UploadValues(url, someNameValueCollectionObject)*/
}
And the controller method signature:
public ActionResult WriteLogFile(DateTime date, int id)
How can I make the first portion of the code pass the DateTime object to this ActionResult method?