Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Building Controls > Web Custom Control, design-time property doesn't change attribute

Reply
Thread Tools

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

 
 
Mateus Padovani Velloso
Guest
Posts: n/a
 
      01-11-2005
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!
 
Reply With Quote
 
 
 
 
LBushkin
Guest
Posts: n/a
 
      02-06-2005
tag the property that conditionally changes the other with the attribute

[RefreshProperties(RefreshProperties.All)]


"Mateus Padovani Velloso" wrote:

> 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!

 
Reply With Quote
 
 
 
 
Mateus Padovani Velloso
Guest
Posts: n/a
 
      02-07-2005
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" wrote:

> tag the property that conditionally changes the other with the attribute
>
> [RefreshProperties(RefreshProperties.All)]
>
>
> "Mateus Padovani Velloso" wrote:
>
> > 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!

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How could I change the NavigateUrl property at runtime based on another controls property ? Radu ASP .Net 2 01-25-2007 10:51 AM
Change the value of an attribute according to the value of another attribute patrizio.trinchini@googlemail.com XML 8 08-22-2006 02:53 PM
JSP Custom Tags as attribute values for other custom tags Dave Java 0 08-14-2006 02:21 PM
Custom Attributes (AttributeTargets.Property) and Property Type Zarko Gajic ASP .Net Building Controls 0 04-07-2005 02:20 PM
Change in value of custom attribute is not reflecting at server side The Developer ASP .Net 3 04-01-2005 11:46 PM



Advertisments