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  
Engage Software - Training Partner for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

The best choice for your web site host, email hosting, and domain registration.
CrystalTech Web Hosting™
Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
AspDotNetStoreFront - E-Commerce by Design - The Leading ASP.NET shopping cart platform for developers!
Click here to go to dev.live.com for Windows Live developer resources
 


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
124 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
50 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
124 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
124 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.

 


FREE Skins, Modules & Control Panel!
Choose how much you want to pay on our Skins, Modules, Containers and Control Panel - Starting from FREE!
www.dnngroup.com
Disgrafic
Diseño y creación de portales web dinámicos :: Desarrollo de módulos personalizados :: Soluciones a medida :: Imagen Corporativa :: Tu proveedor DNN en España
www.disgrafic.com
DM Analytics, LLC
DM Analytics, LLC provides software solutions that facilitate rapid development of independent or dependent datamarts and their associated web-based reporting.
www.dmanalytics.com

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