Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Inheriting From System.Web.UI.Control

Reply
Thread Tools

Inheriting From System.Web.UI.Control

 
 
Ron Vecchi
Guest
Posts: n/a
 
      10-20-2003
I am creating a custom control, and pretty green at it too. Now if I
inherit from WebControl I have a bunch of inherited properties that I don't
need and don't care to implement.
So Is there any problems with Inheriting from Control instead of WebControl.
Is designer support still available at design time?

Thanks,
Ron Vecchi


 
Reply With Quote
 
 
 
 
Alvin Bruney
Guest
Posts: n/a
 
      10-21-2003
That is a very suspect approach.

Rather than focussing on what you don't want to implement, you should be
targetting the environment in which the control will be placed. With that
approach, you would choose to inherit from webcontrols if your user control
were to run in a webcontrol environment because this control is optimized
for the environment.

If you don't want the properties, or don't care to implement them, just
ignore them or don't implement them. Either way, the inheritance heirarchy
pretty much dictates that you get all the functionality whether you want it
or not, or whether or not you choose to implement them.

regards

--


-----------
Got TidBits?
Get it here: www.networkip.net/tidbits/default.htm

"Ron Vecchi" <(E-Mail Removed)> wrote in message
news:#(E-Mail Removed)...
> I am creating a custom control, and pretty green at it too. Now if I
> inherit from WebControl I have a bunch of inherited properties that I

don't
> need and don't care to implement.
> So Is there any problems with Inheriting from Control instead of

WebControl.
> Is designer support still available at design time?
>
> Thanks,
> Ron Vecchi
>
>



 
Reply With Quote
 
 
 
 
Jacob Yang [MSFT]
Guest
Posts: n/a
 
      10-21-2003
Hi Ron,

In ASP.NET world, there are two base classes for us to author our own
custom controls. One is System.Web.UI.Control, the other is
System.Web.UI.WebControls.WebControl. there are almost same, except that if
we are authoring a control that does not provide UI, or one that combines
other controls that render their own UI, derive from Control. Our custom
control renders UI, derive from WebControl.

Please check the URL below for more details,
http://msdn.microsoft.com/library/en...onceptsinwebfo
rmscontroldevelopment.asp?frame=true

Of course, design-time supports are available in both cases. This article
may be helpful for you,

http://www.intertech-inc.com/DOWNLOA...gntimetalk.pdf

Does it answer your question? If I have misunderstood your concern, please
feel free to let me know.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ĘC www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

 
Reply With Quote
 
Ron Vecchi
Guest
Posts: n/a
 
      10-21-2003
That helps, Thanks
"Jacob Yang [MSFT]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi Ron,
>
> In ASP.NET world, there are two base classes for us to author our own
> custom controls. One is System.Web.UI.Control, the other is
> System.Web.UI.WebControls.WebControl. there are almost same, except that

if
> we are authoring a control that does not provide UI, or one that combines
> other controls that render their own UI, derive from Control. Our custom
> control renders UI, derive from WebControl.
>
> Please check the URL below for more details,
>

http://msdn.microsoft.com/library/en...onceptsinwebfo
> rmscontroldevelopment.asp?frame=true
>
> Of course, design-time supports are available in both cases. This article
> may be helpful for you,
>
> http://www.intertech-inc.com/DOWNLOA...gntimetalk.pdf
>
> Does it answer your question? If I have misunderstood your concern, please
> feel free to let me know.
>
> Best regards,
>
> Jacob Yang
> Microsoft Online Partner Support
> Get Secure! ĘC www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
>



 
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
Inheriting class with private constructor Michael Carr ASP .Net 1 12-29-2003 04:59 AM
Inheriting System.UI.ControlCollection for a WebControl - FindControl doesn't work??? Harry F. Harrison ASP .Net 0 12-18-2003 06:28 PM
Inheriting from base form Andy Breward ASP .Net 1 11-07-2003 06:15 AM
inheriting from a class that inherits from the UserControl class Joel Barsotti ASP .Net 4 10-30-2003 08:05 PM
Inheriting local variables from a common source? Wayne J ASP .Net 2 10-24-2003 05:59 PM



Advertisments