Detecting Chnages in a Control Collection

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a Web form made up of several panels of controls. On postback, I need to detect if any of the controls were updated. Is there something like a "Panel.Changed" event or am I stuck iterating through the control collection? Thanks in advance for any help...
 
Hi Joe,

There is not such a feature, you need to manually detect which control
changed.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

Joe Loyd said:
I have a Web form made up of several panels of controls. On postback, I
need to detect if any of the controls were updated. Is there something like
a "Panel.Changed" event or am I stuck iterating through the control
collection? Thanks in advance for any help...
 
ugh, that sucks .... but thank you Ignacio, for the help!...

----- Ignacio Machin ( .NET/ C# MVP ) wrote: ----

Hi Joe

There is not such a feature, you need to manually detect which contro
changed

Cheers

--
Ignacio Machin
ignacio.machin AT dot.state.fl.u
Florida Department Of Transportatio

Joe Loyd said:
I have a Web form made up of several panels of controls. On postback,
need to detect if any of the controls were updated. Is there something lik
a "Panel.Changed" event or am I stuck iterating through the contro
collection? Thanks in advance for any help..
 
Hi Joe,

Well in fact it's not, the panel is transformed on a DIV tag in the client,
it would be complex to add this functionality and frankly I think that it
has no big use ( I havent need it until now )

Now if you really need it you could try to implement it by your own. I
assume that you have a number of web controls inside the panel that do not
have the autosubmit set, if this is so you could try and change them from
webcontrols to HtmlControls equivalents, and using the Attribute collection
you could add a handler for the correct event ( onChange usually ) and in
the handler of it keep track of what control changed ( I would do this by
updating a hidden control )
using this technique you could know in the postback what controls were
changed.

Hope this help,
 
Back
Top