开发者

Client date, time and machine name

How to retrieve client machine's name开发者_开发技巧, and current time and date to save a log... I need syntax in ASP.NET using c#


You cannot retrieve the client machine name on the server as this information is never sent to the server. You could retrieve the client IP though using the Request.UserHostAddress property. The current time on the client could be retrieved using the javascript Date object. To retrieve the time on the server you could use DateTime.Now property.

And by the way, your web server is logging all this information already, so you are probably doing some redundant work.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜