Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Building Controls / June 2006

Tip: Looking for answers? Try searching our database.

User Control in Custom Control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Eric Immerman - 05 Jun 2006 22:53 GMT
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:

<cc1:DigiTab 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>
</cc1:DigiTab>

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
Eric Immerman - 06 Jun 2006 21:30 GMT
I resolved this using the TemplateContainer Attribute.  You can find some
help for this here
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/dat
aboundtemplatedcontrols.asp


Thanks to Phillip Williams for his help with this.

Regards,
Eric Immerman
Solution Manager Development
Allin Interactive

> 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
[quoted text clipped - 30 lines]
> Solution Manager Development
> Allin Interactive

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.