locked
how to show client computer name in C# or Javascript? RRS feed

  • Question

  • Hi,

    Could anyone help me in displaying the client computer name in Sharepoint webpart using C# or Javascript.

    Thanks

    Mahesh

     

    Wednesday, July 27, 2011 8:05 PM

All replies

  • Check below link for Client Side Computer Name.

    http://stackoverflow.com/questions/922476/how-can-i-read-the-clients-machine-computer-name-from-the-browser

    Wednesday, December 21, 2011 11:26 AM
  • Hello,

    Try the link below. It will help you

    http://stackoverflow.com/questions/6691565/how-get-client-user-machine-name-computer-name-with-jquery-or-javascript-or

     

    Monday, February 6, 2012 9:39 AM
  • http://stackoverflow.com/questions/1444592/asp-net-mvc-determine-clients-computer-name

    <script type="text/javascript" language="javascript">
       
    var ax = new ActiveXObject("WScript.Network");
       document
    .write(ax.UserName + '<br />'); //logged in account name
       document
    .write(ax.ComputerName + '<br />'); //Windows PC name
    </script>

    Wednesday, February 8, 2012 5:43 AM
  • Hi,

    System.Net.Dns.GetHostEntry(Request.ServerVariables["REMOTE_ADDR"]).HostName 

    Regards.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help , or you may vote-up a helpful post


    • Proposed as answer by murtazagandhi Wednesday, November 28, 2012 11:00 AM
    • Unproposed as answer by murtazagandhi Wednesday, November 28, 2012 11:01 AM
    • Edited by murtazagandhi Wednesday, November 28, 2012 11:12 AM edit
    Wednesday, November 28, 2012 11:00 AM
  •  Environment.UserName;
    Wednesday, December 12, 2012 11:47 AM