(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/