Solved

Add reference to a VB.net

Posted on 2006-07-17
4
947 Views
Last Modified: 2006-11-18
Hi!
I need to add a reference to a dll file in my codebehind file.(E.g. reference to System.DirectoryServices.dll in default.aspx.vb file) I know how to do this in Visual studio, but how do you do this in a texteditor like notepad??
Please help me on this one..
0
Comment
Question by:frodehoe
  • 2
4 Comments
 
LVL 23

Accepted Solution

by:
apresto earned 400 total points
ID: 17121933
Hi frodehoe,

open the vbprog file in notepad

scroll to the <References> Node

and put something like this in there:

<Reference
                    Name = "System"
                    AssemblyName = "System"
                    HintPath = "..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.dll"
                />

obviously changing it for your dll

Apresto
0
 

Author Comment

by:frodehoe
ID: 17122148
Thanks for the quick answer, but I still got the same error. Shouldn't I put this in the codebehind file somewhere?
I use a asp.net file Search.aspx and a codebehind file Search.aspx.vb
0
 
LVL 23

Assisted Solution

by:apresto
apresto earned 400 total points
ID: 17122168
you will need to recompile the project before it will take effect - have you recompiled
0
 
LVL 7

Assisted Solution

by:skvikram
skvikram earned 100 total points
ID: 17122617
The codebehind file should be named like Search.vb add the following

Imports System.DirectoryServices
Public class CodeBehind
End class

the search.aspx will contain following page directive

<%@ Page Inherits="CodeBehind" Src="Search.vb" %>

Alternatively in search.aspx you can have the following page directive
<%@ Import Namespace="System.DirectoryServices"%>
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question