Get current user name and Authentication Type (VB.net)
<html>
<head>
<script language="vb" runat="server">
Sub Page_Load(Src As Object, E As EventArgs)
lblUser.Text = User.Identity.Name
lblType.Text = User.Identity.AuthenticationType
End Sub
</script>
</head>
<body>
<font face="Verdana" size="4" color="navy">
<b>Windows Authentication</b></font><hr>
<table>
<tr>
<td><b>Current Users Name</b></td>
<td><asp:label id=lblUser runat=server/></td>
</tr>
<tr>
<td><b>Current Authentication Type</b></td>
<TD><asp:label id=lblType runat=server/></TD>
</tr>
</table>
</body>
</html>
Related examples in the same category