Thanks for looking at this!
We're using .NET 1.1 in IIS 6.
Language is VB.NET
I write and edit code in Dreamweaver (because it doesn't try to second
guess me at every step.)
In my page I'm trying to declare a variable as type StringFilters,
which is a class in the StringFiltersNS namespace, in the
StringFilters.vb source file.
I compile with: vbc /t:library stringfilters.vb (ver. is 1.1.4322)
(I've also used the /r:system.dll switch, with no difference in the
results of my test.)
The resulting StringFilters.dll is stored in the root bin folder.
When I use "inherits" and "src" in the page directive (bypassing my
dll), the StringFilters declaration and methods work.
PROBLEM: I don't want my source code stored on the web site.
When I remove the "inherits" and "src" from the page directive, and
use <%@ Import Namespace="StringFiltersNS" %> (see page below), I get
the following error message:
>>>Compiler Error Message: BC30002: Type 'StringFilters' is not defined.<<<
I use the exact same technique (but different dlls, namespaces,
classes) elsewhere on the same web site with no difficulty. All dlls
are in the root bin folder.
'Here is a simplified version of my class file StringFilters.vb
(remember, it works outside the dll.)
------------------------------------
Imports System
Imports Microsoft.VisualBasic
Namespace StringFiltersNS
Public Class StringFilters
Inherits Page 'may not be necessary, but doesn't hurt.
Function ValidThreeAlphas(s As String) As Boolean
' returns true if 3-alpha character input string
' else false
End Function
End Class
End Namespace
------------------------------------
'Here is the opening of the page that calls the dll:
------------------------------------
<%@ Page Language="VB" Debug="true" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Web.Mail" %>
<%@ Import Namespace="StringFiltersNS" %>
<script language="VB" runat="server">
Dim ind as String
Sub Page_Load(ByVal Sender As System.Object, ByVal e As
System.EventArgs)
Dim myFilter As New StringFilters
ind = request.QueryString("ind")
If myFilter.ValidThreeAlphas(ind)) Then
'does something
End If
End Sub '... etc.
------------------------------------
Does anyone see what I'm missing? Any help would be greatly
appreciated!
Thanks.
BC
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web
Services,.NET Remoting" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://cm.megasolutions.net/forums/default.aspx
-~----------~----~----~----~------~----~------~--~---