Design-time property change on webctl not saved in page

Discussion in 'ASP .Net Web Controls' started by atip, Feb 3, 2005.

  1. atip

    atip Guest

    Hi!

    I have a WebControl with 2 properties. In the properties window I change
    one of them. Internally I would like to set another property to a default
    value. When I do this, the first property (the one changed in the properties
    window) gets changed and updates the HTML in the page, but the one changed
    internally is not saved.


    Here's the code:

    public class myControl: System.Web.UI.WebControls.Button {
    private string _one, _two;

    public myControl() : base()
    { /*_*/ }

    public string one {
    get { return _one; }
    set { this.two = value + " and Two!"; _one = value; } }
    public string two {
    get { return _two; }
    set { _two = value; } }
    }

    If I set "one" in the Properties Window to a value, "two" should be set to
    whatever the value of "one" was + " and Two!".
    But although property "two" is changed in the properties window, the changes
    do not appear in the HTML of the page.

    Thanks!
     
    atip, Feb 3, 2005
    #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. Zero
    Replies:
    1
    Views:
    257
  2. Mateus Padovani Velloso

    Web Custom Control, design-time property doesn't change attribute

    Mateus Padovani Velloso, Jan 11, 2005, in forum: ASP .Net Building Controls
    Replies:
    2
    Views:
    260
    Mateus Padovani Velloso
    Feb 7, 2005
  3. Namshub
    Replies:
    1
    Views:
    125
    Teemu Keiski
    Jan 26, 2005
  4. atip

    Design-time property change on webctl not saved

    atip, Feb 5, 2005, in forum: ASP .Net Building Controls
    Replies:
    1
    Views:
    114
    LBushkin
    Feb 6, 2005
  5. Ryan Taylor

    using the Items property in the design time property window

    Ryan Taylor, Feb 8, 2005, in forum: ASP .Net Building Controls
    Replies:
    4
    Views:
    552
    Paul Louth
    Feb 18, 2005
Loading...

Share This Page