[ParseChildren(true)] public class CustomControl : WebControl { public ContentItem Item { get; set; } [PersistenceMode(PersistenceMode.InnerProperty)] [TemplateContainer(typeof(ContentItem))] public ITemplate ContentTemplate { get; set; } protected override void OnInit(EventArgs e) { base.OnInit(e); this.CreateControlHeirarchy(); } public void CreateControlHeirarchy() { this.Item = new ContentItem(); this.Controls.Add(Item); this.ContentTemplate.InstantiateIn(this.Item); } } public class ContentItem : WebControl, INamingContainer { }
Sunday, July 18, 2010
How to build a templated control - Asp.net
Subscribe to:
Post Comments (Atom)
Azure Storage Account Types
Defferent Types of Blobs Block blobs store text and binary data. Block blobs are made up of blocks of data that can be managed individually...
-
Why we need asynchronous tasks? Execute a time consuming operations in parallel to the CLR thread which execute the request If you have ...
-
Demo: I was thinking a way to show images before actually uploading them to server. I would say to preview images using javascript. Obv...
No comments:
Post a Comment