Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > User Control in Custom Control

Reply
Thread Tools

User Control in Custom Control

 
 
Eric Immerman
Guest
Posts: n/a
 
      06-05-2006
I have a tough one that I am hoping somebody has run across. I have created
a Custom Control that is a fancy Tab Control where each Tab is assigned to a
Panel. Each Panel needs to be able to hold whatever content the user would
like.

I have this setup and everything was working fine. Basically from the users
perspective they would add the control to thier page like this:

<cc1igiTab ID="tabAssigned" runat="server">
<cc1:Tab Key="tabAssignedUsers" Text="Assigned Users">
<ContentHTML>
<SPAN>Assigned Users</SPAN>
</ContentHTML>
</cc1:Tab>
<cc1:Tab Key="tabUnassignedUsers" Text="Unssigned Users">
<ContentHTML>
<SPAN>Unassigned Users</SPAN>
</ContentHTML>
</cc1:Tab>
</cc1igiTab>

On the backend I am simple taking anything between the ContentHTML tags and
rendering them as a WebControls.Literal. This worked great until one of my
users stuck a User Control that he had defined on his page, between my
ContentHTML tag. Of course when he did this my control did not render his
user control because I am dealing with it as a literal.

Does anybody know a way that I can allow my users to pass User Controls into
my control within a innerproperty?

Regards,
Eric Immerman
Solution Manager Development
Allin Interactive
 
Reply With Quote
 
 
 
 
Phillip Williams
Guest
Posts: n/a
 
      06-06-2006
Hi Eric,

Take a look at this article for building templated custom controls
http://msdn.microsoft.com/library/de...edcontrols.asp

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com


"Eric Immerman" wrote:

> I have a tough one that I am hoping somebody has run across. I have created
> a Custom Control that is a fancy Tab Control where each Tab is assigned to a
> Panel. Each Panel needs to be able to hold whatever content the user would
> like.
>
> I have this setup and everything was working fine. Basically from the users
> perspective they would add the control to thier page like this:
>
> <cc1igiTab ID="tabAssigned" runat="server">
> <cc1:Tab Key="tabAssignedUsers" Text="Assigned Users">
> <ContentHTML>
> <SPAN>Assigned Users</SPAN>
> </ContentHTML>
> </cc1:Tab>
> <cc1:Tab Key="tabUnassignedUsers" Text="Unssigned Users">
> <ContentHTML>
> <SPAN>Unassigned Users</SPAN>
> </ContentHTML>
> </cc1:Tab>
> </cc1igiTab>
>
> On the backend I am simple taking anything between the ContentHTML tags and
> rendering them as a WebControls.Literal. This worked great until one of my
> users stuck a User Control that he had defined on his page, between my
> ContentHTML tag. Of course when he did this my control did not render his
> user control because I am dealing with it as a literal.
>
> Does anybody know a way that I can allow my users to pass User Controls into
> my control within a innerproperty?
>
> Regards,
> Eric Immerman
> Solution Manager Development
> Allin Interactive

 
Reply With Quote
 
 
 
 
Eric Immerman
Guest
Posts: n/a
 
      06-06-2006
Thanks!! That article definitely solved my problem and my developers are
once again happily making fancy Tab Controls...

Thanks,
Eric Immerman
Solution Manager Development
Allin Interactive

"Phillip Williams" wrote:

> Hi Eric,
>
> Take a look at this article for building templated custom controls
> http://msdn.microsoft.com/library/de...edcontrols.asp
>
> --
> HTH,
> Phillip Williams
> http://www.societopia.net
> http://www.webswapp.com
>
>
> "Eric Immerman" wrote:
>
> > I have a tough one that I am hoping somebody has run across. I have created
> > a Custom Control that is a fancy Tab Control where each Tab is assigned to a
> > Panel. Each Panel needs to be able to hold whatever content the user would
> > like.
> >
> > I have this setup and everything was working fine. Basically from the users
> > perspective they would add the control to thier page like this:
> >
> > <cc1igiTab ID="tabAssigned" runat="server">
> > <cc1:Tab Key="tabAssignedUsers" Text="Assigned Users">
> > <ContentHTML>
> > <SPAN>Assigned Users</SPAN>
> > </ContentHTML>
> > </cc1:Tab>
> > <cc1:Tab Key="tabUnassignedUsers" Text="Unssigned Users">
> > <ContentHTML>
> > <SPAN>Unassigned Users</SPAN>
> > </ContentHTML>
> > </cc1:Tab>
> > </cc1igiTab>
> >
> > On the backend I am simple taking anything between the ContentHTML tags and
> > rendering them as a WebControls.Literal. This worked great until one of my
> > users stuck a User Control that he had defined on his page, between my
> > ContentHTML tag. Of course when he did this my control did not render his
> > user control because I am dealing with it as a literal.
> >
> > Does anybody know a way that I can allow my users to pass User Controls into
> > my control within a innerproperty?
> >
> > Regards,
> > Eric Immerman
> > Solution Manager Development
> > Allin Interactive

 
Reply With Quote
 
Eric Immerman
Guest
Posts: n/a
 
      06-06-2006
Thanks!! That article definitely solved my problem and my developers are
once again happily making fancy Tab Controls...

Thanks,
Eric Immerman
Solution Manager Development
Allin Interactive

"Phillip Williams" wrote:

> Hi Eric,
>
> Take a look at this article for building templated custom controls
> http://msdn.microsoft.com/library/de...edcontrols.asp
>
> --
> HTH,
> Phillip Williams
> http://www.societopia.net
> http://www.webswapp.com
>
>
> "Eric Immerman" wrote:
>
> > I have a tough one that I am hoping somebody has run across. I have created
> > a Custom Control that is a fancy Tab Control where each Tab is assigned to a
> > Panel. Each Panel needs to be able to hold whatever content the user would
> > like.
> >
> > I have this setup and everything was working fine. Basically from the users
> > perspective they would add the control to thier page like this:
> >
> > <cc1igiTab ID="tabAssigned" runat="server">
> > <cc1:Tab Key="tabAssignedUsers" Text="Assigned Users">
> > <ContentHTML>
> > <SPAN>Assigned Users</SPAN>
> > </ContentHTML>
> > </cc1:Tab>
> > <cc1:Tab Key="tabUnassignedUsers" Text="Unssigned Users">
> > <ContentHTML>
> > <SPAN>Unassigned Users</SPAN>
> > </ContentHTML>
> > </cc1:Tab>
> > </cc1igiTab>
> >
> > On the backend I am simple taking anything between the ContentHTML tags and
> > rendering them as a WebControls.Literal. This worked great until one of my
> > users stuck a User Control that he had defined on his page, between my
> > ContentHTML tag. Of course when he did this my control did not render his
> > user control because I am dealing with it as a literal.
> >
> > Does anybody know a way that I can allow my users to pass User Controls into
> > my control within a innerproperty?
> >
> > Regards,
> > Eric Immerman
> > Solution Manager Development
> > Allin Interactive

 
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
Custom control within a custom control J R M ASP .Net 2 06-01-2006 06:04 PM
Custom User Control is not rendered inside another user control in a server table. Leeor Chernov ASP .Net 2 10-16-2005 08:35 AM
Capturing event from other custom control within another custom control Jonah Olsson ASP .Net 1 04-05-2005 01:39 PM
Capturing event from other custom control within another custom control Jonah Olsson ASP .Net Web Controls 2 04-05-2005 12:56 PM
ControlDesigner not invoked on custom control when control is rendered within another custom control Matt Sokol ASP .Net Building Controls 2 08-07-2003 07:13 AM



Advertisments