Solved

Add reference to a VB.net

Posted on 2006-07-17
4
919 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
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…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

763 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now