I have a small web site (7 independent pages) that uses a very basic, though standard authentication process. After logging in when the user navigates the site I inspect the User.Identity.Name property to retrieve the User name and display it in a label
in the top right corner of the browser (just like many sites do) And my code works exactly as expected. Code to retrieve User Name executed in the Page_Load event:
If User.Identity.Name = "" Then
lblGID.Text ="guest"
lnkbLogout.Visible =False
Else
lblGID.Text ="Hi " & User.Identity.Name.ToString
lnkbLogout.Visible =True
End If
But here is where the problem comes in. I have now converted this site to use a Master Page & content pages. I place the same code above in the Page_Load event of either the Master Page or a content page & the User.Identity.Name property ...
Go to the complete details ...