开发者

whats the best way to pass a full date time into a URL in asp.net mvc

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 开发者_如何学Pythonand not lose any precision ?


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 like 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜