locked
not able to persist properties in aspx, but that appear in the property browser RRS feed

  • Question

  • User2118470126 posted

    Hi,

    I'm trying to customize some controls at design-time (and I'm not able to persist all customizations in the aspx file). I use a custom DataBindingHandler in a control. When DataBindControl method is called I use the binding expression to customize my controls: I set some properties according to the expression and information I can get from the DataSet.

    I would like that the properties that I set for the control will be persisted in the aspx file in order not to lose the customizations. To set the properties I use a TypeDescriptor and I call IComponentChangeService.OnComponentChanged after setting them. This results in the component being updated in the design surface and the property being updated in the property browser, but nothing is serialized in the aspx file. I am surely missing something, but I don't know what. I was convinced that IComponentChangeService.OnComponentChanged would fire the serialization.

    I'm also setting some properties of other controls that I access by means of the IReferenceService.

    Any help would be appreciated. Thank you very much,

    Thursday, August 21, 2008 2:46 PM

All replies

  • User2118470126 posted

    Another way to say what I mean. Could I "simulate" through code (in a desiner control) something like a user manually setting the Text property of a TextBox in the property browser? (Which will cause the value to be serialized in the aspx file.) Can I do this from the designer of another Control?

    Friday, August 22, 2008 7:20 AM