#region WebResource Demo using System; 
using System.Collections.Generic; 
using System.ComponentModel; 
using System.Text; 
using System.Web.UI; 
using System.Web.UI.WebControls; [assembly: WebResource("WebCtrl.cutecat.jpg", "image/jpg")] namespace WebCtrl 

        [DefaultProperty("Text")] 
        [ToolboxData("<{0}:WebCustom runat=server></{0}:WebCustom>")] 
    public class WebCustom : WebControl 
        { 
        private string text; 
        private Image m_Image;             [Bindable(true)] 
            [Category("Appearance")] 
            [DefaultValue("")] 
        public string Text 
            { 
            get { return text; } 
            set { text = value; } 
            }         protected override void CreateChildControls() 
            { 
                m_Image = new Image(); 
            this.Controls.Add(m_Image); 
            }         protected override void Render(HtmlTextWriter output) 
            { 
                m_Image.ImageUrl = this.Page.ClientScript.GetWebResourceUrl(typeof(WebCustom), "WebCtrl.cutecat.jpg"); 
            this.RenderChildren(output); 
            } 
        } 

#endregion