DotNet: '' Could not be set on Property ''

  • guest / 204 / Sat, 30 Jan 2010 23:26:00 GMT / Comments (3)
  • This error seems to be sprinkled all across google and all across the
    newsgroups however there do not appear to be any solidified answers.

    Here is my scenario.
    I have a Web User Control that contains several properties that are of a
    custom class.
    This Class Contains multiple properties some of which include Arrays
    (say SqlParameter) for example.

    My Markup should look something like. I am having major designer
    difficulties however both of which result in the infamous error " '' Could
    not be set onproperty ''" whichin this case is an empty value on the
    FillList property.
    I have tried various combos of putting PersistChildren and ParseChildren to
    no avail

    <cc2:WebCustomControl1 id="WebCustomControl11" runat="server">

    <FillList CommandName="asfsadf" ParameterName="sdafas">

    <Parameters>

    <cc3qlParameter ParameterName="...Retail"></cc3qlParameter>

    </Parameters>

    </FillList>

    </cc2:WebCustomControl1>

    The Property Fill list is marked as
    Bindable(true),

    Category("SQL Properties"),

    PersistenceMode(PersistenceMode.InnerProperty),

    NotifyParentProperty(true),

    DesignerSerializationVisibility(DesignerSerializat ionVisibility.Content)]

    public DataParameters FillList

    {

    get { return gFillList; }

    set { gFillList = value; }

    }

    My structure is marked as such and the collection in question
    [TypeConverter(typeof(ExpandableObjectConverter)),

    Browsable(true),

    RefreshProperties(RefreshProperties.Repaint),

    Serializable(),

    ToolboxItem(false)]

    public class DataParameters

    {

    [PersistenceMode(PersistenceMode.InnerProperty) ,

    DesignerSerializationVisibility(DesignerSerializat ionVisibility.Content)]

    public ArrayList Parameters

    {

    get { return gParameters; }

    set { gParameters = value; SetParameters(value); }

    }

    }

  • Keywords:

    set, property, dotnet, .net

  • http://dotnet.itags.org/dotnet-tech/317764/«« Last Thread - Next Thread »»
    1. Hi Recoil,

      Thanks for your posting. Regarding on this issue, I've also found your
      another thread in this group. I've posted my reply there ,I'd appreciate if
      you have a look there. Also, if you feel it convenient that we continue to
      followup in that post, please feel free to post there. Thanks,

      Steven Cheng
      Microsoft Online Support

      Get Secure! www.microsoft.com/security
      (This posting is provided "AS IS", with no warranties, and confers no
      rights.)

      stevenchengmsft | Tues, 03 Jun 2008 23:14:00 GMT |

    2. Illes can be used as a sex-neutral pronoun, like English 'they'. ,

      guest | Thurs, 22 Oct 2009 10:12:00 GMT |

    3. Because you were baptized into Christ and united with Him, crucified with him so that you died with him, now you can live in him. ,

      guest | Wed, 04 Nov 2009 04:01:00 GMT |