Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > User Controls Versus DLLs

Reply
Thread Tools

User Controls Versus DLLs

 
 
Gopal Krish
Guest
Posts: n/a
 
      10-05-2004
Wondering what's the pros and cons in creating reusable web controls
using

1. User Controls
2. C# class that creates the controls programmatically

Example,

I want to develop a page menu (Reset, Back, Submit etc) that I can
reuse in all my screens. Reset and Back are Hyperlinks and Submit is
Link Button (which should fire a Click even when clicked).

My question is..should I develop a reusable user control or should I
write a C# /VB.NET class to create the controls programmatically?

Thanks for any thoughts.

-- Gopal
 
Reply With Quote
 
 
 
 
Lucas Tam
Guest
Posts: n/a
 
      10-05-2004
(Gopal Krish) wrote in news:8b4092e6.0410041628.1add2854
@posting.google.com:

> 1. User Controls
> 2. C# class that creates the controls programmatically
>
> Example,
>
> I want to develop a page menu (Reset, Back, Submit etc) that I can
> reuse in all my screens. Reset and Back are Hyperlinks and Submit is
> Link Button (which should fire a Click even when clicked).
>
> My question is..should I develop a reusable user control or should I
> write a C# /VB.NET class to create the controls programmatically?


You can design the interface graphically with user controls.

With user controls, you can't instantiate them like a normal class, rather
you need to use the LoadControl method. Besides this minor point, I would
use User Controls for design intensive controls. Otherwise I would use a
class.

BTW, you can always mix and match the two... use a user control for the
interface and a class for the logic.

--
Lucas Tam ()
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
 
Reply With Quote
 
 
 
 
Steve C. Orr [MVP, MCSD]
Guest
Posts: n/a
 
      10-05-2004
User controls are easy to create.

Conversly, Custom controls are easier to use and to reuse.

Here's more info:
http://msdn.microsoft.com/library/de...ercontrols.asp
http://msdn.microsoft.com/library/de...ercontrols.asp
http://msdn.microsoft.com/library/de...ebControls.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net



"Gopal Krish" <> wrote in message
news: om...
> Wondering what's the pros and cons in creating reusable web controls
> using
>
> 1. User Controls
> 2. C# class that creates the controls programmatically
>
> Example,
>
> I want to develop a page menu (Reset, Back, Submit etc) that I can
> reuse in all my screens. Reset and Back are Hyperlinks and Submit is
> Link Button (which should fire a Click even when clicked).
>
> My question is..should I develop a reusable user control or should I
> write a C# /VB.NET class to create the controls programmatically?
>
> Thanks for any thoughts.
>
> -- Gopal



 
Reply With Quote
 
Robert Koritnik
Guest
Posts: n/a
 
      10-05-2004
In your case it would be MUCH MUCH easier to write User Controls, while it's
single application dependant and it's not as reusable as Web Custom Controls
should be.

I suggest you to use User Controls in this particular case.

--
RobertK
{ Clever? No just smart. }

"Gopal Krish" <> wrote in message
news: om...
> Wondering what's the pros and cons in creating reusable web controls
> using
>
> 1. User Controls
> 2. C# class that creates the controls programmatically
>
> Example,
>
> I want to develop a page menu (Reset, Back, Submit etc) that I can
> reuse in all my screens. Reset and Back are Hyperlinks and Submit is
> Link Button (which should fire a Click even when clicked).
>
> My question is..should I develop a reusable user control or should I
> write a C# /VB.NET class to create the controls programmatically?
>
> Thanks for any thoughts.
>
> -- Gopal



 
Reply With Quote
 
Gopal Krish
Guest
Posts: n/a
 
      10-05-2004
Thanks much..

"Robert Koritnik" <> wrote in message news:<>...
> In your case it would be MUCH MUCH easier to write User Controls, while it's
> single application dependant and it's not as reusable as Web Custom Controls
> should be.
>
> I suggest you to use User Controls in this particular case.
>
> --
> RobertK
> { Clever? No just smart. }
>
> "Gopal Krish" <> wrote in message
> news: om...
> > Wondering what's the pros and cons in creating reusable web controls
> > using
> >
> > 1. User Controls
> > 2. C# class that creates the controls programmatically
> >
> > Example,
> >
> > I want to develop a page menu (Reset, Back, Submit etc) that I can
> > reuse in all my screens. Reset and Back are Hyperlinks and Submit is
> > Link Button (which should fire a Click even when clicked).
> >
> > My question is..should I develop a reusable user control or should I
> > write a C# /VB.NET class to create the controls programmatically?
> >
> > Thanks for any thoughts.
> >
> > -- Gopal

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Mozilla versus IE versus Opera versus Safari Peter Potamus the Purple Hippo Firefox 0 05-08-2008 12:56 PM
equal? versus eql? versus == versus === verus <=> Paul Butcher Ruby 12 11-28-2007 06:06 AM
User Controls Versus DLLs Gopal Krish ASP .Net 5 10-05-2004 07:06 PM
Separated DLLs for user controls A.M ASP .Net Security 3 02-18-2004 09:10 AM
Separated DLLs for user controls A.M ASP .Net 3 02-18-2004 04:15 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57