property as TextBox

Discussion in 'ASP .Net' started by kaasztelann, Oct 7, 2003.

  1. kaasztelann

    kaasztelann Guest

    The LabelProp property in properties-palette is expandable, so it is OK. The
    problems are:
    1. LabelProp is not persistent
    2. When I change LabelProp.Text in properties-palette, MyControl is NOT
    re-rendered.

    Please Help.

    C# CODE:

    public class MyControl: System.Web.UI.WebControls.WebControl
    {
    Label lab_prop=new Label();

    public Label LabelProp
    {
    set{lab_prop=value; }
    get{return lab_prop;}
    }

    protected override void Render(HtmlTextWriter p_writer)
    {
    p_writer.Write(lab_prop.Text);
    }

    }
     
    kaasztelann, Oct 7, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. S. Justin Gengo
    Replies:
    0
    Views:
    539
    S. Justin Gengo
    Jul 16, 2003
  2. Hazzard
    Replies:
    2
    Views:
    554
    Yan-Hong Huang[MSFT]
    Jul 23, 2003
  3. Natty Gur
    Replies:
    0
    Views:
    463
    Natty Gur
    Jul 22, 2003
  4. =?Utf-8?B?Q2hyaXM=?=
    Replies:
    3
    Views:
    13,787
    Peter Blum
    Mar 30, 2005
  5. Jurjen de Groot
    Replies:
    0
    Views:
    313
    Jurjen de Groot
    May 19, 2008
Loading...

Share This Page