Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx_beginners thread: Using Inlcudes in ASP.NET


Message #1 by "asp" <aspnet@o...> on Tue, 18 Feb 2003 10:27:52 -0500
I have over 25 generic functions that I would like to make available to all my .aspx pages. What is the
proper (and most efficient) way of going about this? Classes, Includes, User Controls, ????

Any help would be greatly appreciated...

Thanks,
-Ralph
Message #2 by "Ken Schaefer" <ken@a...> on Wed, 19 Feb 2003 14:21:06 +1100
Do these routines generate HTML? In which case a user-control might be
"best" (best = easiest)

If these routines are "business-logic" then create a class

Cheers
Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "asp" <aspnet@o...>
Subject: [aspx_beginners] Using Inlcudes in ASP.NET


: I have over 25 generic functions that I would like to make
: available to all my .aspx pages. What is the proper (and
: most efficient) way of going about this? Classes, Includes,
: User Controls, ????
:
: Any help would be greatly appreciated...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Message #3 by "asp" <aspnet@o...> on Wed, 19 Feb 2003 09:06:34 -0500
business logic only...

Is that the general rule? To use classes for business login, and user
controls for routines that generate html?
when would i use includes?

Know of any good places to learn how to impliment classes?

Thanx...

----- Original Message -----
From: "Ken Schaefer" <ken@a...>
To: "aspx_beginners" <aspx_beginners@p...>
Sent: Tuesday, February 18, 2003 10:21 PM
Subject: [aspx_beginners] Re: Using Inlcudes in ASP.NET


> Do these routines generate HTML? In which case a user-control might be
> "best" (best = easiest)
>
> If these routines are "business-logic" then create a class
>
> Cheers
> Ken
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> From: "asp" <aspnet@o...>
> Subject: [aspx_beginners] Using Inlcudes in ASP.NET
>
>
> : I have over 25 generic functions that I would like to make
> : available to all my .aspx pages. What is the proper (and
> : most efficient) way of going about this? Classes, Includes,
> : User Controls, ????
> :
> : Any help would be greatly appreciated...
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>

Message #4 by "Kofi Sarfo" <kofi.sarfo@s...> on Wed, 19 Feb 2003 14:38:37 -0000
In short, there are no "Includes" you have to use a "Class"

I would have opted for classes every time but having said that user
controls for UI-centric code makes sense.

If you'd like to use functions (known as "methods" in .Net) without
instantiating a class then having "public static" functions will allow
you to do just this. It's as close to an "include" as you'll get,
although the idea of an include appears outdated in ASP.NET. In any case
a class is nicer as you can provide access to any of the data members
(public variables, properties and methods) and help define relationships
between data and behaviour.

Probably too much info but hope that helped.


Kofi Sarfo

(wondering why his domain xxxxxx-blend.net has been "suspended" by
register.com)

-----Original Message-----
From: asp [mailto:aspnet@o...]
Sent: 19 February 2003 14:07
To: aspx_beginners
Subject: [aspx_beginners] Re: Using Inlcudes in ASP.NET


business logic only...

Is that the general rule? To use classes for business login, and user
controls for routines that generate html? when would i use includes?

Know of any good places to learn how to impliment classes?

Thanx...

----- Original Message -----
From: "Ken Schaefer" <ken@a...>
To: "aspx_beginners" <aspx_beginners@p...>
Sent: Tuesday, February 18, 2003 10:21 PM
Subject: [aspx_beginners] Re: Using Inlcudes in ASP.NET


> Do these routines generate HTML? In which case a user-control might be

> "best" (best =3D easiest)
>
> If these routines are "business-logic" then create a class
>
> Cheers
> Ken
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> From: "asp" <aspnet@o...>
> Subject: [aspx_beginners] Using Inlcudes in ASP.NET
>
>
> : I have over 25 generic functions that I would like to make
> : available to all my .aspx pages. What is the proper (and
> : most efficient) way of going about this? Classes, Includes,
> : User Controls, ????
> :
> : Any help would be greatly appreciated...
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
> ---
> Change your mail options at http://p2p.wrox.com/manager.asp or to
> unsubscribe send a blank email to


Message #5 by "asp" <aspnet@o...> on Wed, 19 Feb 2003 10:38:56 -0500
Very informative... I am going to take your advice and use classes.... :)

Anyone recommend any article(s) on working with classes???


----- Original Message -----
From: "Kofi Sarfo" <kofi.sarfo@s...>
To: "aspx_beginners" <aspx_beginners@p...>
Sent: Wednesday, February 19, 2003 9:38 AM
Subject: [aspx_beginners] Re: Using Inlcudes in ASP.NET


> In short, there are no "Includes" you have to use a "Class"
>
> I would have opted for classes every time but having said that user
> controls for UI-centric code makes sense.
>
> If you'd like to use functions (known as "methods" in .Net) without
> instantiating a class then having "public static" functions will allow
> you to do just this. It's as close to an "include" as you'll get,
> although the idea of an include appears outdated in ASP.NET. In any case
> a class is nicer as you can provide access to any of the data members
> (public variables, properties and methods) and help define relationships
> between data and behaviour.
>
> Probably too much info but hope that helped.
>
>
> Kofi Sarfo
>
> (wondering why his domain xxxxxx-blend.net has been "suspended" by
> register.com)
>
> -----Original Message-----
> From: asp [mailto:aspnet@o...]
> Sent: 19 February 2003 14:07
> To: aspx_beginners
> Subject: [aspx_beginners] Re: Using Inlcudes in ASP.NET
>
>
> business logic only...
>
> Is that the general rule? To use classes for business login, and user
> controls for routines that generate html? when would i use includes?
>
> Know of any good places to learn how to impliment classes?
>
> Thanx...
>
> ----- Original Message -----
> From: "Ken Schaefer" <ken@a...>
> To: "aspx_beginners" <aspx_beginners@p...>
> Sent: Tuesday, February 18, 2003 10:21 PM
> Subject: [aspx_beginners] Re: Using Inlcudes in ASP.NET
>
>
> > Do these routines generate HTML? In which case a user-control might be
>
> > "best" (best = easiest)
> >
> > If these routines are "business-logic" then create a class
> >
> > Cheers
> > Ken
> >
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > From: "asp" <aspnet@o...>
> > Subject: [aspx_beginners] Using Inlcudes in ASP.NET
> >
> >
> > : I have over 25 generic functions that I would like to make
> > : available to all my .aspx pages. What is the proper (and
> > : most efficient) way of going about this? Classes, Includes,
> > : User Controls, ????
> > :
> > : Any help would be greatly appreciated...
> >
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> >
> > ---
> > Change your mail options at http://p2p.wrox.com/manager.asp or to
> > unsubscribe send a blank email to
>
>
>

Message #6 by "Patrick Sullivan" <pat@s...> on Wed, 19 Feb 2003 16:32:10 -0600
 I don't know of an online resource but I found the book Beginning 
asp.net
with c# by wrox (http://www.wrox.com/books/1861007345.htm) very helpful 
on
this and many more examples there. I actually used it to teach myself 
.net
and some basics of c#, im still learning though, and its getting better. 


I also found this one very helpful when it came to database specific 
things:
http://www.wrox.com/books/1861007418.htm


-----Original Message-----
From: asp [mailto:aspnet@o...]
Sent: Wednesday, February 19, 2003 9:39 AM
To: aspx_beginners
Subject: [aspx_beginners] Re: Using Inlcudes in ASP.NET

Very informative... I am going to take your advice and use classes.... 
:)

Anyone recommend any article(s) on working with classes???


----- Original Message -----
From: "Kofi Sarfo" <kofi.sarfo@s...>
To: "aspx_beginners" <aspx_beginners@p...>
Sent: Wednesday, February 19, 2003 9:38 AM
Subject: [aspx_beginners] Re: Using Inlcudes in ASP.NET


> In short, there are no "Includes" you have to use a "Class"
>
> I would have opted for classes every time but having said that user
> controls for UI-centric code makes sense.
>
> If you'd like to use functions (known as "methods" in .Net) without
> instantiating a class then having "public static" functions will allow
> you to do just this. It's as close to an "include" as you'll get,
> although the idea of an include appears outdated in ASP.NET. In any 
case
> a class is nicer as you can provide access to any of the data members
> (public variables, properties and methods) and help define 
relationships
> between data and behaviour.
>
> Probably too much info but hope that helped.
>
>
> Kofi Sarfo
>
> (wondering why his domain xxxxxx-blend.net has been "suspended" by
> register.com)
>
> -----Original Message-----
> From: asp [mailto:aspnet@o...]
> Sent: 19 February 2003 14:07
> To: aspx_beginners
> Subject: [aspx_beginners] Re: Using Inlcudes in ASP.NET
>
>
> business logic only...
>
> Is that the general rule? To use classes for business login, and user
> controls for routines that generate html? when would i use includes?
>
> Know of any good places to learn how to impliment classes?
>
> Thanx...
>
> ----- Original Message -----
> From: "Ken Schaefer" <ken@a...>
> To: "aspx_beginners" <aspx_beginners@p...>
> Sent: Tuesday, February 18, 2003 10:21 PM
> Subject: [aspx_beginners] Re: Using Inlcudes in ASP.NET
>
>
> > Do these routines generate HTML? In which case a user-control might 
be
>
> > "best" (best =3D easiest)
> >
> > If these routines are "business-logic" then create a class
> >
> > Cheers
> > Ken
> >
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > From: "asp" <aspnet@o...>
> > Subject: [aspx_beginners] Using Inlcudes in ASP.NET
> >
> >
> > : I have over 25 generic functions that I would like to make
> > : available to all my .aspx pages. What is the proper (and
> > : most efficient) way of going about this? Classes, Includes,
> > : User Controls, ????
> > :
> > : Any help would be greatly appreciated...
> >
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> >
> > ---
> > Change your mail options at http://p2p.wrox.com/manager.asp or to
> > unsubscribe send a blank email to
>
>
>





  Return to Index