I'm creating a web site and I have this question, I installed a label with the name Userlbl in the master page, and the idea that I have, is when somebody opens the website, the label shows the computer's user, in my case Welcome: "Charly_csh"
I tried with this code, that I used before in access and it works, when I load the page on the localhost, but when I load on the server, it shows NETWORK SERVICE
The code is this:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Userlbl.Load
Dim wshNetwork As Object 'New wshNetwork
wshNetwork = CreateObject("WScript.Network")
Me.Userlbl.Text = wshNetwork.UserName
wshNetwork = Nothing
Does somebody have an idea???
View Complete Post