开发者

How to get the machine type of the machine accessing an application on a server using .NET?

I'm trying to do different things in my application based on whether the machine accessing the web based program is a mobile device such 开发者_运维知识库as an Iphone or droid or if it is a desktop or laptop.

Is there a way for me to know if the application is fired off by an iphone or some other mobile device?


You may use the browser capabilities object that comes with HttpRequest object.

Check this article in MSDN:

  • https://msdn.microsoft.com/en-us/library/3yekbd5b(v=VS.100).aspx


You can get all the info you need from the Request.Browser object.

Good sample code can be found here: http://msdn.microsoft.com/en-us/library/3yekbd5b.aspx

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜