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

  • Thread starter Mateus Padovani Velloso
  • Start date
M

Mateus Padovani Velloso

Hi,

This seems to be a simple problem, but I am unable to figure out what is
wrong:

I have a Web Custom Control, with two properties (both are strings).

When I change these properties in the property editor, everything goes ok,
and the attributes in page reflect the change.

But now I want to include a simple code in this custom control that changes
one of these properties when I change the other one, right?

Well, now, at design-time, when I change the first property, the second
seems to change too (shows at property editor as if the code worked fine),
but when I see the html source, the attribute of the second property has not
changed, and if I close and reopen the page, the old value comes back also at
property editor.

So, the question is: How can I persist a property that was changed at
design-time, but not directly in the property editor, but by a code called at
design-time from other property?

Thanks!
 
L

LBushkin

tag the property that conditionally changes the other with the attribute

[RefreshProperties(RefreshProperties.All)]
 
M

Mateus Padovani Velloso

Didn't work. Same behavior: change the property, the other one appears to
change at property editor, but when I look at HTML source, it steels with the
old value.

LBushkin said:
tag the property that conditionally changes the other with the attribute

[RefreshProperties(RefreshProperties.All)]


Mateus Padovani Velloso said:
Hi,

This seems to be a simple problem, but I am unable to figure out what is
wrong:

I have a Web Custom Control, with two properties (both are strings).

When I change these properties in the property editor, everything goes ok,
and the attributes in page reflect the change.

But now I want to include a simple code in this custom control that changes
one of these properties when I change the other one, right?

Well, now, at design-time, when I change the first property, the second
seems to change too (shows at property editor as if the code worked fine),
but when I see the html source, the attribute of the second property has not
changed, and if I close and reopen the page, the old value comes back also at
property editor.

So, the question is: How can I persist a property that was changed at
design-time, but not directly in the property editor, but by a code called at
design-time from other property?

Thanks!
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,231
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top