Creating the templated control's inner control class (C#) : Panel « Custom Controls « ASP.NET Tutorial






using System;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebControlLibrary1
{
    public class Message : Panel, INamingContainer
    {
        private string _name;
        private string _text;

        public Message(string name, string text)
        {
            _text = text;
            _name = name;
        }

        public string Name
        {
            get { return _name; }
        }

        public string Text
        {
            get { return _text; }
        }
    }
}








14.10.Panel
14.10.1.Creating the templated control's inner control class (C#)
14.10.2.Creating the templated control's inner control class (VB)