Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8042445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:34:55+00:00 2026-06-05T04:34:55+00:00

how can we create UserControl that is composed of nested tag like this :

  • 0

how can we create UserControl that is composed of nested tag like this :

    <uc:MyPanel>
       <header>
           title here...
       </header>

       <content>
           content here...
       </content>
    </uc:MyPanel>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T04:34:58+00:00Added an answer on June 5, 2026 at 4:34 am

    Here is the solution i found, for people how want to do the same things

    popup.ascx

    <%@ Control Language="C#" AutoEventWireup="true" 
      CodeBehind="Popup.ascx.cs" Inherits="Dynamic.Popup" %>
    <div style="width: 400px; padding: 1px; border: 1px solid #BED6F8;
      background-color: #FFFFFF; position: absolute" runat="server" id="panel">
       <div style="padding: 1px 1px 2px 5px; height: 18px; border: 1px solid #BED6F8; cursor: move;
       background: -moz-linear-gradient(top, white,#BED6F8); background-color: #BED6F8"
       runat="server" id="titlePanel">
    
       <asp:Literal ID="ltTitre" runat="server"></asp:Literal>
    
       <div style="position: absolute; right: 3px; top: 3px; z-index: 100; cursor: pointer">
           <img src="close.png" alt="fermer" onclick="$find('popUpPanel').hide();" />
       </div>
    

    Popup.ascx.cs

     [ParseChildren(true)]
      public partial class Popup : System.Web.UI.UserControl
      {
       [TemplateContainer(typeof(MessageContainer))]
       [PersistenceMode(PersistenceMode.InnerProperty)]
       public ITemplate MessageTemplate { get; set; } 
    
       public string Text { get; set; }
    
      protected void Page_Init(object sender, EventArgs e)
      {
        ltTitre.Text = Text;
    
         if (MessageTemplate != null)
         {
            var i = new MessageContainer();
            MessageTemplate.InstantiateIn(i);
            PlaceHolder1.Controls.Add(i);
         }           
       }
    
         public class MessageContainer : Control, INamingContainer{ }
     }
    

    the use of usercontrols

    <uc:Popup ID="p" runat="server" Text="Titre1">
        <MessageTemplate>
         <asp:LinkButton ID="LinkButton1" runat="server">LinkButton</asp:LinkButton>
           Test
        </MessageTemplate>
    </uc:Popup>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to create a UserControl that will have some behavior(animated collapsing...) and
I am relatively new to WPF and would like to create a UserControl that
I like to create a UserControl with own Header Property. public partial class SomeClass:
In WinForms, how can I create a UserControl that when I put on my
Anyone have an idea how I can create a usercontrol that is only available
I am trying to create a usercontrol that is an extremely simple form. This
I want to create a usercontrol that behaves like the Label usercontrol or the
I can remember that some time ago when I created a UserControl in Visual
How can I create a binding to a property defined in an UserControl from
How can I create a user control like the Textbox? For example when I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.