[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webcontrols

using inheritance in web controls

david

1/3/2003 12:18:00 AM

I am trying to inherit web controls in order to standardize security and GUI
in my application, I inherit the webcontrol and it works fine but I am not
able to load the control in VS design mode. Am I doing something wrong or
is this a limitation of the tool??


1 Answer

Jesse Ezell

1/4/2003 9:44:00 PM

0

Right click the toolbox, add a new tab, and then right
click again and click "Customize Toolbox." from there,
you can browse for your DLL and add it to the toolbox.
Then, you should be able to drag and drop it onto the
page.

To get your control to render in design mode, you may
need to insert the following code:

protected override void Render(HtmlTextWriter writer)
{
if(Site != null && Site.DesignMode)
{
Controls.Clear();
CreateChildControls();
}
base.Render();
}

--Jesse