Ask a Question related to ASP.NET Building Controls, Design and Development.
-
hungrymind@gmail.com #1
How to create server control of Container Type
Hi All,
I am trying to build one server control which has one panel and within
this panel there will be two more panel. I have created two instance of
MyPanel class (inherited by Panel), it works fine in design as well as
runtime. The problem is I want user to be able to add controls on
designtime to the inner panel. Can any body tell me how to achieve
this? I tried inheriting MyPanel class with IContainer, still its not
working. When I inherit the main control with Panel, I am able to add
controls in design time while same I am doing for Inner Panel, its not
working. Also I have tried adding InnerPanel (MyPanel) in Render, Init
method, Constructor of controls, but neither way it worked. Can any
body suggest where I am doing wrong.
wishing you all in anticipation,
warm regards,
- hungrymind
hungrymind@gmail.com Guest
-
Template control not displaying Container properties
I am trying to create a templated control for asp.net 2.0 using the example found in the documentation, however when outputing <%# Container.Message... -
Building a control to container users html
I want to be able to create a control that will wrap any html placed inside the control tag with some predefine html. For example is the... -
User Control - Accessing Properties from the Container Page
Dear all, Please check my problem - Problem: I have created a User Control(UC1) for navigating between pages. There are 4 buttons on the user... -
ASP.NEt Custom Container control
I am creating a tab control. I want to allow the user to drop controls on my tab control at design time the way one can drop controls onto a panel... -
Looking for simple container control
The problem is that you want to nest this control inside of a table, in fact, in between rows of the table. For this, you would need to create your... -
Gary Vidal #2
Re: How to create server control of Container Type
Use ITemplate and in the CreateChildControls
///Property
public ITemplate PanelTemplate
{
get{return m_PanelTemplate;}
set{m_PanelTemplate = value;}
}
///createchildcotnrols
m_PanelTemplate.InstantiateIn(panelToInstantiate);
//add any additional controls to the template
Gary Vidal
<hungrymind@gmail.com> wrote in message
news:1153394028.817097.83060@m79g2000cwm.googlegro ups.com...> Hi All,
>
> I am trying to build one server control which has one panel and within
> this panel there will be two more panel. I have created two instance of
> MyPanel class (inherited by Panel), it works fine in design as well as
> runtime. The problem is I want user to be able to add controls on
> designtime to the inner panel. Can any body tell me how to achieve
> this? I tried inheriting MyPanel class with IContainer, still its not
> working. When I inherit the main control with Panel, I am able to add
> controls in design time while same I am doing for Inner Panel, its not
> working. Also I have tried adding InnerPanel (MyPanel) in Render, Init
> method, Constructor of controls, but neither way it worked. Can any
> body suggest where I am doing wrong.
>
> wishing you all in anticipation,
>
> warm regards,
> - hungrymind
>
Gary Vidal Guest



Reply With Quote

