from title it appears a stupid question :) i know but i have a silverlight application that needs to send datetime to a 3rdparty web method and based on datetime populate some client side controls... now i know how to get datetime from client but problem is that client time could be wrong........ one method is to use a webservice to get datetime any other idea?
标签:
silverlight-2.0
相关问题
- Silverlight: Force Canvas to Invalidate or Repaint
- Simpler Explanation of How to Make Call WCF Servic
- Does Silverlight XAML Support The Byte Data Type?
- Silverlight combobox number of items shown refresh
- Silverlight 3 - Data Binding Position of a rectang
相关文章
- Silverlight: Force Canvas to Invalidate or Repaint
- Simpler Explanation of How to Make Call WCF Servic
- Does Silverlight XAML Support The Byte Data Type?
- Silverlight combobox number of items shown refresh
- Silverlight 3 - Data Binding Position of a rectang
- Convert WPF Application to SilverLight
- Is there any difference in x:name and name for con
- programmatically add column & rows to WPF Datagrid
If you need the reliability of the server's time, then yeah -- a web service would suffice. I ran into a limitation with Silverlight recently that only a web service (WCF or otherwise) would solve. I chose an ordinary .NET web service for my scenario and when it was all said and done it worked like a charm.
Be more specific about your scenario. What do you mean by 'client time could be wrong'?
If you mean that client time could be different than server time because of world time difference (e.g. client accessed from USA while server is in UK) than you have to make sure to convert your time to Universal Time by calling
DateTime.ToUniversalTime()
before sending it.