Reference .NET dll in .aspx page...

Results 1 to 5 of 5

Thread: Reference .NET dll in .aspx page...

  1. #1
    Richard A. Lowe Guest

    Default Reference .NET dll in .aspx page...

    Hi, (I guess it&#039s time for me to start learning this ASP.Net thing, eh?)<BR><BR>Anyway, my question: I&#039m having trouble with the example in the Beta 1 docs that has you create a .NET dll and then reference it through various clients.<BR><BR>In the example, I built a dll with the namespace CompCS, to reference this in my C# aspx page, the example shows the following:<BR><BR>&#060;%@ Page Language="C#" Description="ASP.NET Component Test" %&#062;<BR>&#060;%@ Import Namespace="CompCS"%&#062;<BR><BR>But when I run the page, I get the error: Compiler Error Message: CS0234: The type or namespace name &#039CompCS&#039 does not exist in the class or namespace &#039ASP&#039<BR><BR>When I look at the Detailed Compiler Output it doesn&#039t show my dll being referenced. So it looks like the example left something out... how can I get my dll refenced in the my aspx page?<BR><BR>Thx,<BR>Richard

  2. #2
    Don R. Wolthuis Guest

    Default RE: Reference .NET dll in .aspx page...

    How&#039s it going Richard? Does the DLL you made show up in your Web Applications Bin Directory?<BR><BR>DRW<BR>

  3. #3
    Richard A. Lowe Guest

    Default Further question...

    I saw after I posted that I needed to copy it to the bin folder... thanks for the response. <BR><BR>Further Q: does this mean copying every dll I want to ref into each web app rootin folder? ... I mean, is there a way a dll can be centrally referenced by multiple web apps?<BR><BR>R.

  4. #4
    Don R. Wolthuis Guest

    Default RE: Further question...

    Yes! You can add your Assembly to the "Global Assembly Cache" which makes it accessable globally to the .NET framework. If you have the .NET help files I would recommend investigating it, but to add your dll (assembly) to the GAC use the command line <BR>(gac –i mydll.dll) with gac being Global Assembly Cache Utility <BR><BR>Hope that helps<BR><BR>DRW

  5. #5
    Richard A. Lowe Guest

    Default That helps immensly.. thx

    I will try it out, thanks Don!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts