Using the src attribute in the page registration declaration works.. but there is a way to compile at the command line and then drop the result into the bin directory. Doing it can be a pain.. but.. there's a nice way bypass that pain.
The short answer is: read this-- http://www.flws.com.au/showusyourcode/codeLib/code/CompileSCut.asp? catID=5 The long answer is: First, I think the problem that you've come across is not the comment but rather the compiler doesn't know where to find the dlls for the namespaces you've imported into your code. For instance, if you have Import System.Data at the top of your file and then later on use that refence when declaring a variable such as: Dim ds as DataSet = blah The compiler doesn't know where to find the dll for system.data even though it lives in the system.data.dll. YOu need to tell it where system.data lives like this: vbc /R:system.data.dll /target:library MyVbFile.vb THat's no big deal.. but you've gotta pass a reference to ALL the namespaces you import. This is where the pain comes into the picture: most code imports several namesapaces which force your command line statements to become long, awkward and prone to error. You're command may have to look like this: vbc /R:system.web.dll,system.dll,system.web.services.dll,system.xml.d ll,system.drawing.dll,system.enterpriseservices.dll /target:library MyVbFile.vb THat's the hard way; thankfully, there's an easier way. You store all the dll references in 1 file and simply pass the file name to the compiler. Your command then becomes no matter how many dll references you need: vbc @vbc.rsp /target:library MyVbFile.vb Here's where I learned about this: http://www.flws.com.au/showusyourcode/codeLib/code/CompileSCut.asp? catID=5 (NOTE: If you copy the code in the page above.. it contains a formatting error: there's an extra space next to each "/r: ". YOu need to remove the space between each r switch's colon and the dll name.. and you'll be good to go.) --- In [EMAIL PROTECTED], "Rahul" <[EMAIL PROTECTED]> wrote: > Hi Charles, > > Thanks for the link. > > Can we compile it and put it into bin directory ? > I tried using Net SDK, > > vbc /out:UtilityBelt.dll /t:library C:\UtilityBelt.vb > > but it gave me error on comment lines. Anything wrong to this > process ? > > rgds > Rahul > > --- In [EMAIL PROTECTED], "Charles M. Carroll" > <[EMAIL PROTECTED]> wrote: > > In all the samples like > > http://www.learnasp.com/freebook/learn/utilitybelt_databind.aspx > > > > <%@ Assembly src="utilitybelt.vb" %> > > <%@ Import Namespace="LearnAsp.UtilityBelt"%> > > > > is all that is needed. > > > > Src= > > takes care of the compilation step. > > > > > > At 06:36 AM 5/22/2004, you wrote: > > > > >Hi, > > > > > >I do not have VS.Net and i want to use utility.vb functions > > >in my aspx page. What wud be the steps i have to follow. > > > > > >I tried to compile it using command line vbc but it gave error on > > >comment lines. > > > > > >Any help would be appreciated. > > > > > >rgds > > >Rahul > > > > ---------- > > > > > > --- > > Outgoing mail is certified Virus Free. > > Checked by AVG anti-virus system (http://www.grisoft.com). > > Version: 6.0.687 / Virus Database: 448 - Release Date: 5/16/2004 > > > > > > [Non-text portions of this message have been removed] ------------------------ Yahoo! Groups Sponsor --------------------~--> Yahoo! Domains - Claim yours for only $14.70 http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/saFolB/TM --------------------------------------------------------------------~-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
