Click here to Skip to main content
15,885,435 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I had very tried very much but i failed please tell me how to detect the operating system on the client machine?
Posted

Use Request.Browser.Platform, and the version is in Request.UserAgent
 
Share this answer
 
You can use javascript code for detecting the OS on the client machine:
JavaScript
<script language="javascript" type="text/javascript">
 var OSName="Unknown OS";
 if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows";
 if (navigator.appVersion.indexOf("Mac")!=-1) OSName="MacOS";
 if (navigator.appVersion.indexOf("X11")!=-1) OSName="UNIX";
 if (navigator.appVersion.indexOf("Linux")!=-1) OSName="Linux";
 document.write('Your OS: '+OSName);
 </script>


Good luck.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900