|
| Custom WebControl component - Detecting deletion |
 |
Mon, 24 Mar 2008 13:02:40 +000 |
Hi guys,
I have a seemingly simple problem, to which I have no solution.
Working in VS2005 and C#.
I created a custom WebControl component. I also added a ControlDesigner to the
component. I can detect whether a component was dragged-and-dropped onto a
target webpage, by catching the OnInit even of the control or the Initialize
event of the designer. My problem is, how do I detect whether the user of my
component has deleted the component from the target webpage. I can catch the
OnUnload event in the component or the Dispose event in the Designer, but these
events are also fired when I close the project or close the web designer file or
when I switch to source view and then back to Design view again. So I am never
sure whether the component was deleted or whether the project was just closed or
altered.
This is, off course, all taking place at design-time. T
hank you, Div.
|
| Post Reply
|
|
|
|
|
|
|
|
|
|