views:

43

answers:

1

i have a full datetime object that i need to pass in as a parameter in a URL.

what is the best way to do this so it fully can get converted to a csharp DateTime object and not lose any precision ?

+4  A: 

pass it as a Ticks. and convert the Ticks back to DateTime. Ticks is a long datatype and datetime accepts long datatype to be converted to DateTime

For example, in mvc, your url looks line this myweb.com/Pass/Date/634164331846947633 you can get the 3rd segment of your url which is by default id and convert it to DateTime.

rob waminal
+1, easy and safe.
Alastair Pitts