Custom Controls are not rendered in the editor

Posts   
 
    
gabrielk avatar
gabrielk
User
Posts: 231
Joined: 01-Feb-2005
# Posted on: 13-Feb-2005 20:23:14   

Hi Folks,

Maybe someone knows a answer to this little problem (asp.net)

I created a custom button class which gets a text value in the language the user has got in is Culture settings. The problem is that when I place this control in de webeditor it won't show a button. Instead it shows:

[ LocalizedButton "btSave" ]

So I just show the classname and the (ID) of the button. What did I do wrong?

This is the button:


    public class LocalizedButton : Button
    {
        public LocalizedButton()
        {
            //
            // TODO: Add constructor logic here
            //      
            this.CssClass = "input";
        }

        protected override void Render(HtmlTextWriter writer)
        {
            // Logic to fill 'res' 
            {...}
            // Action to the button
            this.Text = res.Value.ToString();
            base.Render (writer);           
            res.Dispose();
        }
    }


What did I do wrong?

Thanks in advance!

Greets, Gab