Interface Reference Error


The following piece of code is in a VB file IZipCode.VB that is in the App_Code directory.

Public
Interface IZIPCode

ReadOnly Property ZIPCode() As String

End Interface

 It is referenced in a user control by the following:

<%@ Implements Interface="IZIPCode" %>

When I run the page that has the user control on it, I get the following error message:


Parser Error Message: Could not load type 'IZIPCode'.

Source Error:

Line 1:  <%@ Control Language="VB" ClassName="ZIPCodePart" %>
Line 2:  <%@ Implements Interface="IZIPCode" %>
Line 3:  <script runat="server">
Line 4:      


Source File: /WebParts1/ZIPCodePart.ascx    Line:

Any insights?

 Thanks,

 Dave 

 

 

<%@ Implements Interface="IZIPCode" %>

0
drl
12/31/2007 6:57:40 PM
asp.net.web-forms 93655 articles. 5 followers. Follow

3 Replies
422 Views

Similar Articles

[PageSpeed] 17

 in your code behind page. for the control. Please try the following

Public Partial Class ZipCodePart
    Inherits System.Web.UI.UserControl
    implements IZipCode

End Class 

Remove the implements declaration in your ascx file


Jeev
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you get the answer to your question, please mark it as the answer.
0
Jeev
12/31/2007 7:27:27 PM

That didn't do the trick.

0
drl
12/31/2007 8:23:42 PM

 Hi drl.. do you have a code behind page? the control declaration suggests otherwise

It ought to look something like this if there is a codebehind page

<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="DispatchAlphabetic.ascx.vb" Inherits="Controls.DispatchAlphabetic" %> 

If you have a code behind page.. then inherits should be there 


Jeev
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you get the answer to your question, please mark it as the answer.
0
Jeev
12/31/2007 8:26:48 PM
Reply: