Solved

Add reference to a VB.net

Posted on 2006-07-17
4
954 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

One of the pain points with developing AJAX, JavaScript, JQuery, and other client-side behaviors is that JavaScript doesn’t allow for cross domain request for pulling content. For example, JavaScript code on www.johnchapman.name could not pull conte…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …
Suggested Courses

739 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