CompositeControl properties not reflected in Property window

Last post 08-28-2007 12:43 AM by Max Kukartsev. 23 replies.

Sort Posts:

  • CompositeControl properties not reflected in Property window

    08-22-2007, 11:40 AM
    • Member
      110 point Member
    • Rab815
    • Member since 01-28-2003, 8:16 PM
    • Ripple Effects
    • Posts 40

    I have a little test composite control I'm writing.  Later it will have more controls... but for right now I just have a simple label that I want to render and I've made it's Text property accessible through the properties window.  However I'm seeing something strange.  When I go into design mode, then go to the properties window and set the LabelText property, the value I type disappears from the property window but it DOES appear when I switch back to source from design view.  So the change is being made but you cannot see the value in the properties window for design time.  Anyone have an idea as to why this is occuring?  The control is listed below.  This is being developed in .NET 2.0

    [//AspNetHostingPermission(SecurityAction.LinkDemand,

    // Level = AspNetHostingPermissionLevel.Minimal),

    DefaultProperty("LabelText"),

    ToolboxData("<{0}:TestControl runat=\"server\"> </{0}:TestControl>")]

    public class TestControl: CompositeControl

    {

    private Label testLabel;public TestControl()

    {

     

    }

     

    [
    Bindable(true),

    DefaultValue(""),

    Description("Text to display on the label")]public string LabelText

    {

    get

    {

    EnsureChildControls();

    return testLabel.Text;

    }

    set

    {

    EnsureChildControls();

    testLabel.Text =
    value;

    }

    }

    protected override void CreateChildControls()

    {

    Controls.Clear();

    testLabel =
    new Label();testLabel.ID = "testLabel";

    Controls.Add(testLabel);

    }

    protected override void Render(HtmlTextWriter writer)

    {

    testLabel.RenderControl(writer);

    base.Render(writer);

    }

    }

  • Re: CompositeControl properties not reflected in Property window

    08-22-2007, 12:14 PM
    Answer

    Hi, 

    The problem is that you assign the properties directly to the child control, and ensure its creation every time you get or set them, but when it's created over again, the properties you've set are reset.
    You should store the properties of child controls as your own in viewstate (works at design-time and runtime), and assign them in the CreateChildControls method, like in the following code definition. Also, as long as you add your label to your Controls collection, CompositeControl (or WebControl) will take care of rendering it for you, and you don't need to render it yourself. If you decide to anyway, then don't call the base implementation, because it will render it again, resulting in duplicated text. Finally, you shouldn't worry about setting the ID property of your label, because you derive from CompositeControl, which implements INamingContainer, making sure the ID's of your child controls are unique from the other controls on the page.

    This is how it should be:

      [DefaultProperty("LabelText"),
      ToolboxData("<{0}:TestControl runat=\"server\"> </{0}:TestControl>")]

      public class TestControl : CompositeControl {
        private Label testLabel;
        public TestControl() {
        }

        [Bindable(true),
        DefaultValue(""),
        Description("Text to display on the label")]
        public string LabelText {
          get {
            return (string)ViewState["LabelText"] ?? String.Empty;
          }
          set {
            ViewState["LabelText"] = value;
          }
        }
        protected override void CreateChildControls() {
          Controls.Clear();
          testLabel = new Label();
          //not necessary to manually set ID
          testLabel.ID = "testLabel";
          //assign property here
          testLabel.Text = LabelText;
          Controls.Add(testLabel);

        }
        protected override void Render(HtmlTextWriter writer) {
          //either manually render the label
          testLabel.RenderControl(writer);
          //or call the base implementation to render it for you
          //base.Render(writer);
        }
      }

    Hope this helps. Wink 

  • Re: CompositeControl properties not reflected in Property window

    08-22-2007, 12:41 PM
    • Member
      110 point Member
    • Rab815
    • Member since 01-28-2003, 8:16 PM
    • Ripple Effects
    • Posts 40

    That did the trick!  Wierd thing is I had to copy and paste the whole block you posted back into my code for it to work... when I just copied out the portions that changed it still wasn't working right.  EIther that or it cached an old version.  Either way it's working now!   Hopefully I can duplicate this for other controls and additional properties I want to set for them... should every property be set in viewstate?  What about using ControlState? I heard that if you use viewstate and viewstate is turned off it could affect the controls.

     Also, when then are you required to call EnsureChildControls()??  Doesn't this ensure that your controls are created/updated when changes are made to properties that affect the underlying childcontrols.

    What is the "??" double question mark notation.
     

  • Re: CompositeControl properties not reflected in Property window

    08-22-2007, 9:07 PM

    You don't have to store a property in viewstate; it's just a best practice because viewstate preserves the data across post-backs and works at design-time, too. With a private variable, the data will be erased after each post-back, which is generally not the desired effect.
    You can use control state, yes, and control state is viewstate essentially, but it can't be disabled. Also, to discourage developers from stuffing it up with too much data like a state bag, data is added with Pair objects. So, my advice is to use control state for critical data that absolutely must be preserved in view state at all times.

    The (A ?? B) is a shorthand notation for A == null ? B : A. That is, - whatever is before the ?? is what to check for a null reference, and what is after, - what to return if it is a null reference. So, in this case, the value retreived from view state is checked for a null reference, and if it is null, String.Empty is returned. I find performing the check unnecessary, but actually it is a practice done by Visual Studio 2005, and when one creates a new web custom control in VS2005 in a library, the generated code automatically includes a Text property which upon retrieval checks the returned value from view state for null and if it is, returns String.Empty.

    EnsureChildControls() is usually called in an overriden DataBind() method if the control used templates to render portions of its interface, and in CompositeControl, it's called upon accessing the Controls collection, to make sure that the controls have been created first.

    If you're interested in providing design time support with template editing (overriding TemplateGroups property in a control designer and calling SetViewFlags(ViewFlags.TemplateEditing, true) in the Initialize(...) method) I'll tell you one more thing I think you should know about EnsureChildControls(), and that's that when you finish editing templates through the smart tag, the control isn't automatically updated because the call to DataBind() doesn't re-create the controls but the call to EnsureChildControls() considers them as already created and does nothing.
    To solve this problem, instead of calling EnsureChildControls(), call CreateChildControls() and set ChildControlsCreated to true. I saw this technique in the MSDN library, although I wasn't sure what exactly it does.

    Cheers.
    ...I hope you don't mind the rather lengthy response.

  • Re: CompositeControl properties not reflected in Property window

    08-23-2007, 9:53 AM
    • Member
      110 point Member
    • Rab815
    • Member since 01-28-2003, 8:16 PM
    • Ripple Effects
    • Posts 40

    No not at all.  I appreciate the detailed response!  You've been quite helpful!  I'm not currently making any databound controls but I'll definitely have to keep that in mind.  I'm essentially attempting to construct a library of components that my company can use throughout it's sites.  I've found that we have a ton of places where we use email text boxes, phone numbers, addresses...etc...  I'm working on a phone number control now with two validators built in.

    I tried to use the ?? notation in regard to a boolean type property but it didn't like it.  Apparently it doesn't like that for boolean types.  I ended up using the following.

            public bool Required
            {
                get
                {
                    object b = ViewState["Required"];
                    return (b == null) ? true : (bool)b;
                }
                set
                {
                    ViewState["Required"] = value;
                }
            }
    I've been  successful in providing design support for most of the properties that I want public.  I will say one thing I did find out... when you have validators built into the composite controls you DO seem to have to set the ID of the control you wish to validate, otherwise the validators don't get an id in the Controltovalidate property.  I know you said you didn't have to explicitly set the ID of the controls in createchildcontrols when you inherit from CompositeControl, but I think that is only if you don't have any other controls renferencing others within the code.

            protected override void CreateChildControls()
            {
                Controls.Clear();

                phoneLabel = new Label();
                phoneLabel.Text = LabelText;
                //phoneLabel.ID = "phoneLabel";
                Controls.Add(phoneLabel);

                phoneTextBox = new TextBox();
                phoneTextBox.Text = Text;
                phoneTextBox.ID = "phoneText";    <---  HAD TO SET THIS
                phoneTextBox.Attributes.Add("onblur", "formatPhone(this)");
                Controls.Add(phoneTextBox);

                phoneRequired = new RequiredFieldValidator();
                phoneRequired.Enabled = Required;
                phoneRequired.ErrorMessage = RequiredErrorMessage;
                phoneRequired.Text = RequiredErrorText;
                phoneRequired.ValidationGroup = ValidationGroup;
                phoneRequired.ID = "valReqPhoneNumber";
                phoneRequired.ControlToValidate = phoneTextBox.ID;  <-- Otherwise this failed at runtime
                //phoneRequired.Text = "*";
                Controls.Add(phoneRequired);

                phoneRegex = new RegularExpressionValidator();
                phoneRegex.Enabled = FormatRequired;
                phoneRegex.ErrorMessage = FormatErrorMessage;
                phoneRegex.Text = FormatErrorText;
                phoneRegex.ValidationGroup = ValidationGroup;
                phoneRegex.ID = "valRegexPhoneNumber";
                phoneRegex.ControlToValidate = phoneTextBox.ID;
                //phoneRegex.Text = "*";
                phoneRegex.ValidationExpression = @"(((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4})|\d{10}|\d{7}";
                Controls.Add(phoneRegex); //


            }

     

    I hope if I have any other questions you might be available for answers.  You know... just when I think I've figured these controls out, I go to build a new one and seem to run into different problems.  Thanks again for all your help!

  • Re: CompositeControl properties not reflected in Property window

    08-23-2007, 10:38 AM
    • Member
      110 point Member
    • Rab815
    • Member since 01-28-2003, 8:16 PM
    • Ripple Effects
    • Posts 40

    Ok here is a problem.  I figured it would be cool to be able to set the regular expresison in the property window... however I would like the one I've used in the post above to be the default

            [Bindable(true),
            Category("Behavior"),
            DefaultValue(@"(((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4})|\d{10}|\d{7}"),
            Description("Regular expression used to format the phone number")
            ]
            public string FormatExpression
            {
                get
                {
                    return (string)ViewState["FormatExpression"] ?? @"(((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4})|\d{10}|\d{7}";
                }
                set
                {
                    ViewState["FormatExpression"] = value;
                }
            }  

    This is what I've used in the property, however the value of the regular expression does not want to appear in the property window at design time, why is it that this won't but the boolean values will???? 

  • Re: CompositeControl properties not reflected in Property window

    08-23-2007, 11:36 AM
    • Member
      110 point Member
    • Rab815
    • Member since 01-28-2003, 8:16 PM
    • Ripple Effects
    • Posts 40

     AH HA!  I figured it out...

            [Bindable(true),
            Category("Behavior"),
            DefaultValue(@"(((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4})|\d{10}|\d{7}"),
            Description("Regular expression used to format the phone number")
            ]
            public string FormatExpression
            {
                get
                {
                    object b = ViewState["FormatExpression"];
                    return (String.IsNullOrEmpty((string)b)) ? @"(((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4})|\d{10}|\d{7}" : (string)b;

                    //return (string)ViewState["FormatExpression"] ?? String.Empty;
                }
                set
                {
                    ViewState["FormatExpression"] = value;
                }
            }       
     

  • Re: CompositeControl properties not reflected in Property window

    08-24-2007, 1:14 AM

    For your boolean problem, it makes perfect sense for the code to not work, because System.Boolean is a value type, meaning it can't be null. When you cast a null reference of a reference type into a value type, an exception occurs. To make it work, cast it to a type of (bool?), which is a nullable type, creating a wrapper generic structure of type System.INullable<T>, which you can use to check for a null reference just like strings and other reference types.

    So, this is the correct way:

    (bool?)ViewState["..."] ?? (false | true)
     

    ----------------------- 

    If you want a way to provide a default value for a property, here's an idea

    (of course just having the DefaultValueAttribute isn't enough; it simply instructs ASP.NET to not persist the value when it's default (which you can programmatically check through PropertyDescriptor.ShouldSerializeValue method))

    you can assign it in the constructor, so the value returned won't be null just because it was unassigned. However, if a user programmatically assigns a null value to the property, null is what the user will get. Depends on the behavior you want.

  • Re: CompositeControl properties not reflected in Property window

    08-24-2007, 1:28 AM
    You're right... The problems never end: always something new just around the corner! Smile
  • Re: CompositeControl properties not reflected in Property window

    08-24-2007, 9:36 AM
    • Member
      110 point Member
    • Rab815
    • Member since 01-28-2003, 8:16 PM
    • Ripple Effects
    • Posts 40

    Ahhh, I keep forgetting about those newer nullable types for value types.  I did discover through trial and error that any property having a defined defaultvalueattribute would not be serialized to the asp.net code in design time if it was set to that default value.  Would you recommend any good books on server/composite control development.  I'd like to learn more about this stuff.  Things like this PropertyDescriptor.ShouldSerializeValue attribute is news to me.  I'm sure there are many of those that would make life easier.

     Also as far as inheritance goes...  I did try something because most of the basics on my control library will be similar, ie... many of the text box controls will have a required field validator, and a regex validator so I was thinking about putting them in a base class which itself inherits from CompositeControl, then extend that base class to say (phonenumbertxtctrl,emailtxtctrl etc...)  However when I did that and tried adding it to the toolbox the baseclass was added to the tool box as well.. is there a way to eliminate that behavior.  It's either that or I build the base class to be used as a generic control to be used by itself, then extend it properly to become more specific for phone numbers and emails etc...

  • Re: CompositeControl properties not reflected in Property window

    08-24-2007, 1:07 PM

    Well, there are several books. A good book on simply C# (not specific to ASP.NET but has a little ASP.NET at the end) is "Pro C# 2005 and the .NET 2.0 Platform" by Andrew Troelsen (http://apress.com/book/bookDisplay.html?bID=390), which actually has a newer edition ("Pro C# with .NET 3.0, Special Edition"). A specialized book on ASP.NET 2.0, and has a chapter on user controls, one on custom controls, and one about design-time support is "Pro ASP.NET in C# 2005, Special Edition" (http://apress.com/book/bookDisplay.html?bID=10195) SE includes an extra chapter or two devoted to AJAX and client-side script behavior. That is the book which is useful for learning object models, and it's actually where I read to assign property values to child controls in CreateChildControls(), not directly and other stuff.
    The problem is, any books devoted to ASP.NET control development are for .NET 1.x. But come to think of it, the book "Pro ASP.NET in C# 2005" largely focuses on the various improvements in ASP.NET 2.0, and so to supplement it with one of the dedicated ASP.NET control development books would be sufficient. The frustrations I've encountered with the older books is that a some amount of their code is obsolete. But I'm sure once you look into MSDN it'll show you the "non-obsolete" alternative.
    Two dedicated books on ASP.NET controls are "Building ASP.NET Server Controls" (http://apress.com/book/bookDisplay.html?bID=262) and "Developing Microsoft ASP.NET Server Controls and Components" (http://www.microsoft.com/MSPress/books/5728.aspx).
    ------------------
    Easy! If you want to hide a control from the toolbox, just decorate it with the ToolBoxItemAttribute(false), which also prevents it from appearing in ASPX intellisense (a drop-down list of available controls when you start typing). However, the user will still be able to instantiate it programmatically, so I'd also suggest making the constructor non-public, if you haven't done so already...

    Hope I was of assistance...

  • Re: CompositeControl properties not reflected in Property window

    08-24-2007, 6:07 PM
    • Member
      110 point Member
    • Rab815
    • Member since 01-28-2003, 8:16 PM
    • Ripple Effects
    • Posts 40

    Now I'm really confused... I put everything in ViewState as you stated and it works great in design time.  I can set the required properties no problem.... however... I can't get the Text property at runtime.  it comes back as blank on postback.  ie... I put the control on a page, put in a phone number, then on postback the Text property is blank...  I posted the whole control below.  Everything else is working great... if I set the required field to true or the regex validator to true and give them messages it reacts on submit perfect... but the actual text value comes back as blank!  I was trying to figure this out for over an hour with no results.  Any ideas?

    using System;

    using System.Text;

    using System.Data;

    using System.Configuration;

    using System.Web;

    using System.Web.Security;

    using System.Web.UI;

    using System.Web.UI.WebControls;

    using System.Web.UI.WebControls.WebParts;

    using System.Web.UI.HtmlControls;

    using System.ComponentModel;

    using System.Security.Permissions;

    namespace Controls.TextBoxes

    {

    /// <summary>

    /// Summary description for PhoneControl

    /// </summary>

    [AspNetHostingPermission(SecurityAction.LinkDemand,

    Level = AspNetHostingPermissionLevel.Minimal),

    DefaultProperty("Text"),

    ToolboxData("<{0}:PhoneNumberTextCtrl runat=\"server\"> </{0}:PhoneNumberTextCtrl>")]

    public class PhoneNumberTextCtrl : CompositeControl

    {

    private TextBox phoneTextBox;

    private RequiredFieldValidator phoneRequired;

    private RegularExpressionValidator phoneRegex;

    private Style phoneStyle;

     

    #region Properties

    [Bindable(true),Category("Appearance"),

    Description("Phone number for textbox")]public string Text

    {

    get

    {

    return (string)ViewState["Text"] ?? String.Empty;

    }

    set

    {

    ViewState[
    "Text"] = value;

    }

    }

    [
    Bindable(true),Category("Behavior"),

    Description("Is this field Required?")]

    public bool Required

    {

    get

    {

    return (bool?)ViewState["Required"] ?? (false);

    //object b = ViewState["Required"];

    //return (b == null) ? false : (bool)b;

    }

    set

    {

    ViewState[
    "Required"] = value;

    }

    }

    [
    Bindable(true),Category("Behavior"),

    Description("Error Message to display if textbox is left blank")]

    public string RequiredErrorMessage

    {

    get

    {

    return (string)ViewState["RequiredErrorMessage"] ?? String.Empty;

    }

    set

    {

    ViewState[
    "RequiredErrorMessage"] = value;

    }

    }

     

    [
    Bindable(true),Category("Behavior"),

    Description("Error Message to display if textbox is left blank")]

    public string RequiredErrorText

    {

    get

    {

    return (string)ViewState["RequiredErrorText"] ?? String.Empty;

    }

    set

    {

    ViewState[
    "RequiredErrorText"] = value;

    }

    }

    [
    Bindable(true),Category("Behavior"),

    Description("Validation Group the control belongs to")]

    public string ValidationGroup

    {

    get

    {

    return (string)ViewState["ValidationGroup"] ?? String.Empty;

    }

    set

    {

    ViewState[
    "ValidationGroup"] = value;

    }

    }

     

    [
    Bindable(true),Category("Behavior"),

    Description("Is this field Required?")]

    public bool FormatRequired

    {

    get

    {

    return (bool?)ViewState["FormatRequired"] ?? (false);

    }

    set

    {

    ViewState[
    "FormatRequired"] = value;

    }

    }

     

    [
    Bindable(true),Category("Behavior"),

    Description("Text to display if the phone number is not in the correct format")]

    public string FormatErrorMessage

    {

    get

    {

    return (string)ViewState["FormatErrorMessage"] ?? String.Empty;

    }

    set

    {

    ViewState[
    "FormatErrorMessage"] = value;

    }

    }

     

    [
    Bindable(true),Category("Behavior"),

    Description("Text to display if the phone number is not in the correct format")]

    public string FormatErrorText

    {

    get

    {

    return (string)ViewState["FormatErrorText"] ?? String.Empty;

    }

    set

    {

    ViewState[
    "FormatErrorText"] = value;

    }

    }

    [
    Bindable(true),Category("Behavior"),

    Description("Regular expression used to format the phone number")]

    public string FormatExpression

    {

    get

    {

    object b = ViewState["FormatExpression"];

    return (String.IsNullOrEmpty((string)b)) ? @"(((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4})|\d{10}|\d{7}" : (string)b;

    //return (string)ViewState["FormatExpression"] ?? String.Empty;

    }

    set

    {

    ViewState[
    "FormatExpression"] = value;

    }

    }

    [
    Category("Styles"),

    DesignerSerializationVisibility(

    DesignerSerializationVisibility.Visible),

    PersistenceMode(PersistenceMode.InnerProperty),

    Description("The strongly typed style for the TextBox child control.")]public Style PhoneTextBoxStyle

    {

    get

    {

    if (phoneStyle == null)

    {

    phoneStyle =
    new Style();

    }

    return phoneStyle;

    }

    }

    #endregion

     

    public PhoneNumberTextCtrl()

    {

     

    }

    protected override void AddParsedSubObject(object o)

    {

    // Declaratively specified child controls get added through this method.

    // However, the DatePicker builds its own child controls, and does not

    // want to allow the page developer to add controls, which could potentially

    // mess up the control's collection.

    throw new Exception("Cannot add child objects declaratively.");

    }

    protected override void OnPreRender(EventArgs e)

    {

    RenderJavaScript();

    }

    protected override void CreateChildControls()

    {

    Controls.Clear();

    phoneTextBox =
    new TextBox();

    phoneTextBox.Text = Text;

    phoneTextBox.ID =
    "phoneText";phoneTextBox.Attributes.Add("onblur", "formatPhone(this)");

    Controls.Add(phoneTextBox);

    phoneRequired =
    new RequiredFieldValidator();

    phoneRequired.Enabled = Required;

    phoneRequired.ErrorMessage = RequiredErrorMessage;

    phoneRequired.Text = RequiredErrorText;

    phoneRequired.ValidationGroup = ValidationGroup;

    phoneRequired.ControlToValidate = phoneTextBox.ID;

    Controls.Add(phoneRequired);

    phoneRegex =
    new RegularExpressionValidator();

    phoneRegex.Enabled = FormatRequired;

    phoneRegex.ErrorMessage = FormatErrorMessage;

    phoneRegex.Text = FormatErrorText;

    phoneRegex.ValidationGroup = ValidationGroup;

    phoneRegex.ControlToValidate = phoneTextBox.ID;

    phoneRegex.ValidationExpression = FormatExpression;

    Controls.Add(phoneRegex); //

    }

    protected override void Render(HtmlTextWriter writer)

    {

    AddAttributesToRender(writer);

    if (phoneStyle != null)

    {

    phoneTextBox.ApplyStyle(phoneStyle);

    }

    phoneTextBox.RenderControl(writer);

    phoneRequired.RenderControl(writer);

    phoneRegex.RenderControl(writer);

    }

    private void RenderJavaScript()

    {

    String csname2 = "formatPhone";

    Type cstype = this.GetType();

    // Get a ClientScriptManager reference from the Page class.

    ClientScriptManager cs = Page.ClientScript;

    // Check to see if the client script is already registered.

    if (!cs.IsClientScriptBlockRegistered(cstype, csname2))

    {

    StringBuilder sb = new StringBuilder();

    sb.Append("<script type=text/javascript>");

    sb.Append("function formatPhone(phoneTextBox){\r\n");

    sb.Append("\tvar text = phoneTextBox.value;\r\n");

    sb.Append("\ttext = text.replace(/\\D+/g,\"\");\r\n");

    sb.Append("\tif(text.length == 10){\r\n");

    sb.Append("\t\t phoneTextBox.value = \"(\" + text.substr(0,3) + \") \" + text.substr(3,3) + \"-\" + text.substr(6,4);\r\n");

    sb.Append("\t}\r\n");

    sb.Append("\tif(text.length == 7){\r\n");

    sb.Append("\t\t phoneTextBox.value = text.substr(0,3) + \"-\" + text.substr(3,4);\r\n");

    sb.Append("\t}\r\n");

    sb.Append("}\r\n");

    sb.Append("</script>");cs.RegisterClientScriptBlock(cstype, csname2, sb.ToString(), false);

    }

    }

     

    }

    }

  • Re: CompositeControl properties not reflected in Property window

    08-24-2007, 7:33 PM

    I see the problem. It's that when the Render() method is called, the Text property of the child control (not the one stored in ViewState) is still set to its old value. Since the properties of the child controls are assigned in CreateChildControls(), you should call CreateChildControls() the first thing in your Render() method.

  • Re: CompositeControl properties not reflected in Property window

    08-25-2007, 12:47 AM
    • Member
      110 point Member
    • Rab815
    • Member since 01-28-2003, 8:16 PM
    • Ripple Effects
    • Posts 40

    That didn't seem to work... matter of fact that actually reset the value to nothing on the front end.  Before that it was being carried though in the viewstate I just couldn't access the method in the page load.  Funny part is I read that I don't even need to override and use the render method because the controls know how to render themselves unless I want to give it special formatting.  It actually still renders fine without the method... still doesn't work though.  Something is screwy with the viewstate usage because if I set the "Text" property at design time then view the page the value doesn't show up when the page initially comes up, but if I just postback the page using a simple asp:button and set a label to the value of the Text property, then the label gets set fine, AND the value appears in the textbox control in the composite control on the web page.  Such strange behavior... I'm missing something in the way this thing renders... some order of operation.

  • Re: CompositeControl properties not reflected in Property window

    08-25-2007, 2:01 AM
Page 1 of 2 (24 items) 1 2 Next >