How to find out if properties of other controls in page is changed

M

madani

Hi,

I made custom web control. this control have an Event like "TestEvent",
How can I find out if properties of other controls of parent Page is
changed inside this event when I fire that event ?

I need to know which controls changed during TestEvent. I can not
compare them before and after TestEvent, because it's not possible to
implement compare for all kind of possible controls that Page object
may contain.

-madani
 
M

Marina

How exactly would you expect to be able to get this type of information?

One idea is to have an argument class inheriting from EventArgs that your
event handler requires. In there, is a collection property. The event
handler is responsible for adding every control that it changes to that
collection. Whatever raised the event, can then check the collection
afterwards and know that every control in it has been modified.
 
M

madani

Hi,

I don't want to force user to add controls that changed to a
collection, I'm trying to find out a way to find changes, indivisible
from user. My idea was make an array of checksum of rendered controls
before calling event handler, then after calling event handler, I will
render controls and get checksum again, and compare them with old
checksums, but the problem is that controls can not be rendered alone,
they need "Form" tag and etc. There is a control that actually done
this, but the source is not provided. So it's not possible to do it.
But I'm looking for the way it done this.
regards,

-madani
 

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

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top