re:
!I was wondering if it's possible to create a MASTER sub routine
!where all the pages can call it and perform it's task for that page.
Wonder no more.
There's 2 solutions to that problem :
1. Create a helper class in your application's App_Code directory.
( anyName.cs or anyName.vb )
You can now call your master routine from any page.
2. Create a helper class ( anyName.cs or anyName.vb ), compile the class
to an assembly, and place the assembly in the /bin directory of your application.
vbc /t:library /out:anyName.dll anyName.vb
anyName.dll will be created/compiled in the current directory.
Move the assembly to the /bin directory of your application and fire away.
If you want to have VS.NET use it, reference it in your project.
If you want to use C#, then the command line would be :
csc /t:library /out:anyName.dll anyName.cs
If you need to import .Net classes, include them in your command line:
vbc /t:library /r:system.dll /r:system.web.dll /out:anyName.dll anyName.vb
or
csc /t:library /r:system.data.dll /r:system.web.dll /out:anyName.dll anyName.cs
After that, you can import the namespace into any page with :
<%@ Import Namespace="YourClassname" %>
Juan T. Llibre, asp.net MVP
asp.net faq :
http://asp.net.do/faq/
foros de asp.net, en español :
http://asp.net.do/foros/
======================================
"pvong" <phillip*at*yahoo*dot*comwrote in message news:e1**************@TK2MSFTNGP04.phx.gbl...
I'm a newbie. I'm using VS2008 & VB.net
I have a simple site and each page uses the same sub-routine. I copy and paste to each page and that's no big deal
but that can get tiresome. I was wondering if it's possible to create a MASTER sub routine where all the pages can
call it and perform it's task for that page. If so, where would I create something like that in VS2008?
Thanks!
Phil