Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: Newbie code behind / system.web question


Message #1 by pat.hastings@s... on Thu, 21 Mar 2002 10:28:40
Hi,

no doubt a real dumb question but everything i've seen seems to suggest 
that it should work. I want to be able to write some vb objects that can 
directly write stuff to an HTML Page (ie use Response.write etc) and have 
them compiled as dlls so that when i distribute my app i don't have people 
going in and ripping it off.

I am thinking that i should be able to use this using a code behind script 
and then compiling it with references to the system.web.dll but the 
compiler keeps on bugging out on me even on the simplest example:

VB code = :
public class mypage
	inherits System.Web.UI.Page
	dim mydir as System.Messaging.Message = new 
System.Messaging.Message()
end class

Compiler call = :
vbc pat.vb /r:system.messaging.dll /r:system.web.dll

Error Msg = :
C:\Dev\gwenissia.net\webapplication2\pat.vb(4) : error BC30007: Reference 
required to assembly 'System' containing the base 
class 'System.ComponentModel.Component'. Add one to your project.

    dim mydir as System.Messaging.Message = new System.Messaging.Message()
                 ~~~~~~~~~~~~~~~~~~~~~~~~

Can someone please tell me where i'm being stupid.

Pat
Message #2 by "Cliff Schneide" <Cliff_Schneide@n...> on Thu, 21 Mar 2002 10:19:20 -0500
I think it wants you to add an import statement with
System.ComponentModel.Component as the reference...

try it...

Cliff Schneide
Web Developer
Computer Aid Inc,




pat.hastings@s... on 03/21/2002 05:28:40 AM

Please respond to "aspx_beginners" <aspx_beginners@p...>

To:   "aspx_beginners" <aspx_beginners@p...>
cc:    (bcc: Cliff Schneide/CAICORP)
Subject:  [aspx_beginners] Newbie code behind / system.web question



Hi,

no doubt a real dumb question but everything i've seen seems to suggest
that it should work. I want to be able to write some vb objects that can
directly write stuff to an HTML Page (ie use Response.write etc) and have
them compiled as dlls so that when i distribute my app i don't have people
going in and ripping it off.

I am thinking that i should be able to use this using a code behind script
and then compiling it with references to the system.web.dll but the
compiler keeps on bugging out on me even on the simplest example:

VB code = :
public class mypage
     inherits System.Web.UI.Page
     dim mydir as System.Messaging.Message = new
System.Messaging.Message()
end class

Compiler call = :
vbc pat.vb /r:system.messaging.dll /r:system.web.dll

Error Msg = :
C:\Dev\gwenissia.net\webapplication2\pat.vb(4) : error BC30007: Reference
required to assembly 'System' containing the base
class 'System.ComponentModel.Component'. Add one to your project.

    dim mydir as System.Messaging.Message = new System.Messaging.Message()
                 ~~~~~~~~~~~~~~~~~~~~~~~~

Can someone please tell me where i'm being stupid.

Pat


Message #3 by "Pat Hastings" <pat.hastings@s...> on Thu, 21 Mar 2002 15:36:30 -0000
I ahd tried that but that didn't work. I eventually solved by adding 
/r:system.dll to the compiler command.

now i just havework out how to get my project to reference the dll 
rather than the raw vb code.

Any ideas?

PAt

-----Original Message-----
From: Cliff Schneide [mailto:Cliff_Schneide@n...]
Sent: 21 March 2002 15:19
To: aspx_beginners
Subject: [aspx_beginners] Re: Newbie code behind / system.web question


I think it wants you to add an import statement with
System.ComponentModel.Component as the reference...

try it...

Cliff Schneide
Web Developer
Computer Aid Inc,




pat.hastings@s... on 03/21/2002 05:28:40 AM

Please respond to "aspx_beginners" <aspx_beginners@p...>

To:   "aspx_beginners" <aspx_beginners@p...>
cc:    (bcc: Cliff Schneide/CAICORP)
Subject:  [aspx_beginners] Newbie code behind / system.web question



Hi,

no doubt a real dumb question but everything i've seen seems to suggest
that it should work. I want to be able to write some vb objects that can
directly write stuff to an HTML Page (ie use Response.write etc) and 
have
them compiled as dlls so that when i distribute my app i don't have 
people
going in and ripping it off.

I am thinking that i should be able to use this using a code behind 
script
and then compiling it with references to the system.web.dll but the
compiler keeps on bugging out on me even on the simplest example:

VB code =3D :
public class mypage
     inherits System.Web.UI.Page
     dim mydir as System.Messaging.Message =3D new
System.Messaging.Message()
end class

Compiler call =3D :
vbc pat.vb /r:system.messaging.dll /r:system.web.dll

Error Msg =3D :
C:\Dev\gwenissia.net\webapplication2\pat.vb(4) : error BC30007: 
Reference
required to assembly 'System' containing the base
class 'System.ComponentModel.Component'. Add one to your project.

    dim mydir as System.Messaging.Message =3D new 
System.Messaging.Message()
                 ~~~~~~~~~~~~~~~~~~~~~~~~

Can someone please tell me where i'm being stupid.

Pat




--------------------------------------------------------

The contents of this e-mail are confidential to the ordinary user of the 
e-mail address to which it was addressed, or in the case of an 
incorrectly addressed e-mail message, the intended recipient. No-one 
else may copy, use, disseminate or forward all or any part of it in any 
form.

Although this email, including any attachments, is believed to be free 
of any virus, or other defect which might affect any computer or IT 
system into which it is received and opened, it is the responsibility of 
the recipient to ensure that it is virus free, and no responsibility is 
accepted for any loss or damage arising in any way from its use.

The views expressed in this e-mail are those of the sender and not 
necessarily the employees company.

If you receive this e-mail in error please accept our apology.  If this 
is the case we would be obliged if you would contact the sender and then 
delete the e-mail.

--------------------------------------------------------
Message #4 by "Cliff Schneide" <Cliff_Schneide@n...> on Thu, 21 Mar 2002 10:56:14 -0500
Add a reference in Visual Studio to the dll... if it is registred, it will be in
the list... add it with the add reference to the project... and it should work..

Cliff




"Pat Hastings" <pat.hastings@s...> on 03/21/2002 10:36:30 AM

Please respond to "aspx_beginners" <aspx_beginners@p...>

To:   "aspx_beginners" <aspx_beginners@p...>
cc:    (bcc: Cliff Schneide/CAICORP)
Subject:  [aspx_beginners] Re: Newbie code behind / system.web question



I ahd tried that but that didn't work. I eventually solved by adding
/r:system.dll to the compiler command.

now i just havework out how to get my project to reference the dll rather than
the raw vb code.

Any ideas?

PAt

-----Original Message-----
From: Cliff Schneide [mailto:Cliff_Schneide@n...]
Sent: 21 March 2002 15:19
To: aspx_beginners
Subject: [aspx_beginners] Re: Newbie code behind / system.web question


I think it wants you to add an import statement with
System.ComponentModel.Component as the reference...

try it...

Cliff Schneide
Web Developer
Computer Aid Inc,




pat.hastings@s... on 03/21/2002 05:28:40 AM

Please respond to "aspx_beginners" <aspx_beginners@p...>

To:   "aspx_beginners" <aspx_beginners@p...>
cc:    (bcc: Cliff Schneide/CAICORP)
Subject:  [aspx_beginners] Newbie code behind / system.web question



Hi,

no doubt a real dumb question but everything i've seen seems to suggest
that it should work. I want to be able to write some vb objects that can
directly write stuff to an HTML Page (ie use Response.write etc) and have
them compiled as dlls so that when i distribute my app i don't have people
going in and ripping it off.

I am thinking that i should be able to use this using a code behind script
and then compiling it with references to the system.web.dll but the
compiler keeps on bugging out on me even on the simplest example:

VB code = :
public class mypage
     inherits System.Web.UI.Page
     dim mydir as System.Messaging.Message = new
System.Messaging.Message()
end class

Compiler call = :
vbc pat.vb /r:system.messaging.dll /r:system.web.dll

Error Msg = :
C:\Dev\gwenissia.net\webapplication2\pat.vb(4) : error BC30007: Reference
required to assembly 'System' containing the base
class 'System.ComponentModel.Component'. Add one to your project.

    dim mydir as System.Messaging.Message = new System.Messaging.Message()
                 ~~~~~~~~~~~~~~~~~~~~~~~~

Can someone please tell me where i'm being stupid.

Pat




--------------------------------------------------------

The contents of this e-mail are confidential to the ordinary user of the e-mail
address to which it was addressed, or in the case of an incorrectly addressed
e-mail message, the intended recipient. No-one else may copy, use, disseminate
or forward all or any part of it in any form.

Although this email, including any attachments, is believed to be free of any
virus, or other defect which might affect any computer or IT system into which
it is received and opened, it is the responsibility of the recipient to ensure
that it is virus free, and no responsibility is accepted for any loss or damage
arising in any way from its use.

The views expressed in this e-mail are those of the sender and not necessarily
the employees company.

If you receive this e-mail in error please accept our apology.  If this is the
case we would be obliged if you would contact the sender and then delete the
e-mail.

--------------------------------------------------------



Message #5 by "Pat Hastings" <pat.hastings@s...> on Thu, 21 Mar 2002 16:10:20 -0000
Tryed that

If you place it in the /bin dir then you shouldn't need to register the 
dll right?
so i put it in the /bin then add a reference to it though i have to 
manually browse to find the dll (ie does not show up in the list).

Now with it referencing the dll i should be able to change the name of 
the class in the VB script and it should all work. which it kinda does. 
IE it works when you just goto the aspx in the browser but comes up with 
an error in Visual Studio saying it can't find the namespace i'm 
refering to and refusing to compile into debug mode

Pat


-----Original Message-----
From: Cliff Schneide [mailto:Cliff_Schneide@n...]
Sent: 21 March 2002 15:56
To: aspx_beginners
Subject: [aspx_beginners] Re: Newbie code behind / system.web question


Add a reference in Visual Studio to the dll... if it is registred, it 
will be in
the list... add it with the add reference to the project... and it 
should work..

Cliff




"Pat Hastings" <pat.hastings@s...> on 03/21/2002 10:36:30 
AM

Please respond to "aspx_beginners" <aspx_beginners@p...>

To:   "aspx_beginners" <aspx_beginners@p...>
cc:    (bcc: Cliff Schneide/CAICORP)
Subject:  [aspx_beginners] Re: Newbie code behind / system.web question



I ahd tried that but that didn't work. I eventually solved by adding
/r:system.dll to the compiler command.

now i just havework out how to get my project to reference the dll 
rather than
the raw vb code.

Any ideas?

PAt

-----Original Message-----
From: Cliff Schneide [mailto:Cliff_Schneide@n...]
Sent: 21 March 2002 15:19
To: aspx_beginners
Subject: [aspx_beginners] Re: Newbie code behind / system.web question


I think it wants you to add an import statement with
System.ComponentModel.Component as the reference...

try it...

Cliff Schneide
Web Developer
Computer Aid Inc,




pat.hastings@s... on 03/21/2002 05:28:40 AM

Please respond to "aspx_beginners" <aspx_beginners@p...>

To:   "aspx_beginners" <aspx_beginners@p...>
cc:    (bcc: Cliff Schneide/CAICORP)
Subject:  [aspx_beginners] Newbie code behind / system.web question



Hi,

no doubt a real dumb question but everything i've seen seems to suggest
that it should work. I want to be able to write some vb objects that can
directly write stuff to an HTML Page (ie use Response.write etc) and 
have
them compiled as dlls so that when i distribute my app i don't have 
people
going in and ripping it off.

I am thinking that i should be able to use this using a code behind 
script
and then compiling it with references to the system.web.dll but the
compiler keeps on bugging out on me even on the simplest example:

VB code =3D :
public class mypage
     inherits System.Web.UI.Page
     dim mydir as System.Messaging.Message =3D new
System.Messaging.Message()
end class

Compiler call =3D :
vbc pat.vb /r:system.messaging.dll /r:system.web.dll

Error Msg =3D :
C:\Dev\gwenissia.net\webapplication2\pat.vb(4) : error BC30007: 
Reference
required to assembly 'System' containing the base
class 'System.ComponentModel.Component'. Add one to your project.

    dim mydir as System.Messaging.Message =3D new 
System.Messaging.Message()
                 ~~~~~~~~~~~~~~~~~~~~~~~~

Can someone please tell me where i'm being stupid.

Pat




--------------------------------------------------------

The contents of this e-mail are confidential to the ordinary user of the 
e-mail
address to which it was addressed, or in the case of an incorrectly 
addressed
e-mail message, the intended recipient. No-one else may copy, use, 
disseminate
or forward all or any part of it in any form.

Although this email, including any attachments, is believed to be free 
of any
virus, or other defect which might affect any computer or IT system into 
which
it is received and opened, it is the responsibility of the recipient to 
ensure
that it is virus free, and no responsibility is accepted for any loss or 
damage
arising in any way from its use.

The views expressed in this e-mail are those of the sender and not 
necessarily
the employees company.

If you receive this e-mail in error please accept our apology.  If this 
is the
case we would be obliged if you would contact the sender and then delete 
the
e-mail.

--------------------------------------------------------





--------------------------------------------------------

The contents of this e-mail are confidential to the ordinary user of the 
e-mail address to which it was addressed, or in the case of an 
incorrectly addressed e-mail message, the intended recipient. No-one 
else may copy, use, disseminate or forward all or any part of it in any 
form.

Although this email, including any attachments, is believed to be free 
of any virus, or other defect which might affect any computer or IT 
system into which it is received and opened, it is the responsibility of 
the recipient to ensure that it is virus free, and no responsibility is 
accepted for any loss or damage arising in any way from its use.

The views expressed in this e-mail are those of the sender and not 
necessarily the employees company.

If you receive this e-mail in error please accept our apology.  If this 
is the case we would be obliged if you would contact the sender and then 
delete the e-mail.

--------------------------------------------------------

  Return to Index