Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

The best choice for your web site host, email hosting, and domain registration.
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
 


  Sponsors  

Meet Our Sponsors

DataSprings - Great Ideas. Always Flowing.
R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
The Official Microsoft ASP.NET Website
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Handling deletion of a module
Previous Previous
 
Next Next
New Post 6/23/2008 8:25 AM
Unresolved
User is offline Joshua Beall
121 posts
9th Ranked


Handling deletion of a module 

Hi All,

I went through Michael Washington's tutorial on DNN 4 Module Development, and I've successfully built a quiz module.  Everything works great, but one thing I wasn't sure how to handle is module deletion.  When a module is deleted off the page, the data (in my case, quiz questions) for that module should also be deleted.  Is there a "module being deleted" event of some kind that I can register a listener for?  How do I do cleanup when my module is being deleted off the page?

  -Josh

 
New Post 6/24/2008 3:23 PM
User is offline Snoek8
49 posts
www.mexmax-internet.com
10th Ranked


Re: Handling deletion of a module 

I imagine you use the moduleID when saving you quiz data into you quiz table. If you would create a relation in your database between the moduleID in your quiz table and the ModuleID in the TabModules table and set it to cascade on delete your data should be deleted when the module is deleted. This will however only be triggered when the module is completely deleted, not when it is placed in the recycle bin.

Stephan
Dotnetnuke modules

 
New Post 7/1/2008 10:59 AM
User is offline Joshua Beall
121 posts
9th Ranked


Re: Handling deletion of a module 

 Snoek8 wrote

I imagine you use the moduleID when saving you quiz data into you quiz table. If you would create a relation in your database between the moduleID in your quiz table and the ModuleID in the TabModules table and set it to cascade on delete your data should be deleted when the module is deleted.

That would work -- but is there no way to do it in code, e.g., by registering an event handler for a "module deletion" event?

 
New Post 8/27/2008 11:34 AM
User is offline Joshua Beall
121 posts
9th Ranked


Re: Handling deletion of a module 

 Joshua Beall wrote

 Snoek8 wrote

I imagine you use the moduleID when saving you quiz data into you quiz table. If you would create a relation in your database between the moduleID in your quiz table and the ModuleID in the TabModules table and set it to cascade on delete your data should be deleted when the module is deleted.

 

That would work -- but is there no way to do it in code, e.g., by registering an event handler for a "module deletion" event?

Any further feedback?  Is there any way to handle the cleanup in .NET, or does it have to be done at the database level?

  -Josh

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Handling deletion of a module
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


$7.16/mo - Powerful DotNetNuke Hosting
Powerful DotNetNuke Hosting starting at under $8/mo with FREE SQL 2005, FREE Installation and expert support.
www.re-invent.com
ASP.NET Web Hosting for $3.95
3 Month FREE ASP.NET Hosting! FREE Setup! DNN Support! FREE Domain Name! FREE Components! Host multiple websites on 1 plan! 30 Days Money Back Guarantee!
www.dailyrazor.com
Cestus Websites
DotNetNuke websites en services in Nederland. Cestus Websites levert websites, projectmanagent, skins, modules, training en gespecialiseerde hosting op basis van het CMS DotNetNuke.
www.dotnetnuke-websites.nl

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP