<%@ Page %>
<script Language="vb" runat="server">
Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)
Dim User As System.DirectoryServices.DirectoryEntry
Try
User = New System.DirectoryServices.DirectoryEntry("LDAP://CN=Username, CN=users, DC=DomainName")
Dim Value As String
Value = User.Properties("HomeNumber").Item(0)
Catch
'Show error message
Finally
User.Close()
End Try
End Sub
</script>
|