Re: Import directive error

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Girish Bharadwaj (girishb_at_mvps.org)
Date: 09/14/04


Date: Tue, 14 Sep 2004 09:10:39 -0400

Help :
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpgenref/html/cpconassembly.h
tm
<%@ Assembly Name="MyAssembly" %>

Or, you can use the web.config to add the directive as well.See MSDN for
more help.

-- 
Girish Bharadwaj
http://msmvps.com/gbvb
"amallik" <amallik@discussions.microsoft.com> wrote in message
news:462580E2-060F-478A-B551-9D3AD93AACC9@microsoft.com...
> How do you add an "assembly reference" in a *.aspx file?
> <%@ Assembly %> does not solve the problem.
>
> "Shiva" wrote:
>
> > Hi,
> > Use the <%@ Assembly %> directive.
> >
> > "Sharon Tal" <talsharon@hotmail.com> wrote in message
> > news:OMrj5d1iEHA.2340@TK2MSFTNGP11.phx.gbl...
> > Hi Raghavendra and thanks for your reply.
> > How do i add a reference to aspx page.
> > I know how to do it with csc.exe, but this is a web page.
> > I'm not working with Visual Studio.
> > Thanks.
> >
> > "Raghavendra T V" <raagzvb@hotmail.com> wrote in message
> > news:%23sKhE80iEHA.2544@TK2MSFTNGP10.phx.gbl...
> > > Hi Sharon,
> > >
> > > Make sure you have added reference to the System.Runtime.Remoting.dll.
> > > If you have added and still getting this error i suggest you to remove
the
> > > reference and then add it again.
> > >
> > > Hope this helps you.
> > >
> > > Thanks
> > > Raghavendra
> > >
> > > "Sharon Tal" <talsharon@hotmail.com> wrote in message
> > > news:O%23AZo10iEHA.704@TK2MSFTNGP09.phx.gbl...
> > > > Compiler Error Message: CS0234: The type or namespace name 'Http'
does
> > not
> > > > exist in the class or namespace 'System.Runtime.Remoting.Channels'
(are
> > > you
> > > > missing an assembly reference?)
> > > >
> > > > Source Error:
> > > >
> > > >
> > > > Line 2:  <%@ Import Namespace="System.Runtime.Remoting" %>
> > > > Line 3:  <%@ Import Namespace="System.Runtime.Remoting.Channels" %>
> > > > Line 4:  <%@ Import
Namespace="System.Runtime.Remoting.Channels.Http" %>
> > > > Line 5:
> > > > Line 6:  <%@ Page Language="C#" AutoEventWireup="True" %>
> > > >
> > > >
> > > > Any ideas?
> > > > 10x, Sharon.
> > > >
> > > >
> > >
> > >
> >
> >
> >
> >


Relevant Pages

  • Re: Import directive error
    ... How do you add an "assembly reference" in a *.aspx file? ... > Hi Raghavendra and thanks for your reply. ...
    (microsoft.public.dotnet.framework.aspnet)
  • File or assembly name or one of its dependencies, was not found.
    ... I'm receiving the error message shown below when I try to load an aspx file ... Policy not being applied to reference at this time (private, custom, ... partial, or location-based assembly bind). ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Using User Controls, Code-Behind, Components and ASPX files
    ... > reference to the ascx which can contain a reference to a component. ... > can an aspx file contain a reference to an ascx file which contains a ... > ASCX file ... > Public Class cb2 ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: open text file in browser window using hyperlink
    ... You can't reference the txt files like that. ... query and use in that ASPX file to stream. ... But on clicking on that hyperlink does not open the file. ... file to be opne in browser in a new window. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Reference html file from an aspx file
    ... I am trying to reference an html page from an aspx file. ... This works fine except that referenced images are not displayed. ...
    (microsoft.public.dotnet.framework.aspnet)