In my view I'm using this line to go to another view when I click on a empty date in the DayPilotMonth calendar:
In my controller of this view I have this code:
if (Request.QueryString["startingtime"] != null)
startingtime = Convert.ToDateTime(Request.QueryString["startingtime"]);
ViewBag.Message = startingtime;
ViewBag.Message = "Error";
But when I run the application I get error at the Convert.ToDateTime line.
The following error message pops up: An exception of type 'System.FormatException' occurred in mscorlib.dll but was not handled in user code
Additional information: String was not recognized as a valid DateTime.
Can someone give me a hint or something? Thanks in advance. :)