User-6580369 posted
<%@ Page Language="VB" %>
<%@ Import Namespace="System.DirectoryService" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta name="WebPartPageExpansion" content="full" />
<meta http-equiv="Content-Language" content="en-us" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled 1</title>
<style type="text/css">
.style1 {
text-align: center;
}
.style2 {
text-align: left;
}
</style>
</head>
<body>
<script type="text/vb" runat="server">
Private Sub PopulateGrid()
Dim dListing As DirectoryEntry = GetListing()
End Function
I am getting "DIrectoryEntry is not defined". I assume this is because I need to add a reference. I normally develop in Visual Studio, and would go "Project > Reference > Select Component", and then import the namespace. I figure I have to do the same
thing here, but I have no idea how. I am using Sharepoint Designer to create a single ASP page.
Warning: BC40056: Namespace or type specified in the Imports 'System.DirectoryService' doesn't contain any public member or cannot be found. Make sure the namespace or the type is defined and contains at least one public member. Make sure the imported element name doesn't use any aliases.
Source Error:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\77af5d62\8d9d3330\App_Web_15_63a4413b-9b82-46e0-8377-2f9fb64c70b8_-573700.rmssqttv.0.vb
Line 20: Imports System.Configuration
Line 21: Imports System.Data.SqlClient
Line 22: Imports System.DirectoryService
Line 23: Imports System.Linq
Line 24: Imports System.Text