Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Communication between a module and Custom Controls in the skin?Communication between a module and Custom Controls in the skin?
Previous
 
Next
New Post
9/14/2009 9:36 AM
 

Hi

I've been creating a shopping cart system out of modules.  I have a results module and a cart module.  The results module is able to tell the cart to update when an Add button is clicked using OnModuleCommunication. Both modules are inside update panels. 

I've now been asked to add a CustomControl to the skin that displays the text 'X items in the basket'.  How could i update this when the add or remove buttons are clicked?  I was looking into event handlers but wasn't really sure how to do this.  Is anyone able to point me in the right direction?

Simon

 
New Post
9/14/2009 9:54 AM
 

I'd look at creating a module for this instead of doing something in the skin, easier control over it that way, imo. Then you can have it update itself in whatever way works.

 
New Post
9/14/2009 10:23 AM
 

That was what i  had originally thought of doing.  However the site allows certain trusted users to view the page in edit mode and add/remove certain modules.  When this happens the basket counter completely fudges with the skin.  On top of that i don't want them to be able to add modules to that pane (although they are trusted users, that doesn't mean they won't do stupid things).

I know there are ways around this but i was hoping there would be another way to do it which would be less work as we have 50+ skins in use and i'm sick of editing them all.  Seemed easier (if possible) to add a custom control to them all, so any changes are done to one single file.  Most of the skin is like this apart from pane's.

 

 
New Post
9/14/2009 8:36 PM
 

If you are stuck doing it in the skin (ahh, users, how we do so love you) then I'd suggest looking at how the breadcrumbs or other "register" items are programmed/designed that are in the ascx of the skin, and follow suit with that. I believe it's basically like adding a module/usercontrol to the skin. I've never done it, there might be something else to making a skin object (as I believe they are called) but that would be the best starting point. Things like the bread crumbs, or logo controls.

 
New Post
9/15/2009 3:21 AM
 

I've actually already made it.  The control will display the number of items in the basket as it can grab the information in the Page_load event.  The problem i'm having is i need it to update the same time i add an item to my basket.  For example the product search results and basket that displays each item are in update panels and so can add items without reloading the page.  I want to be able to do the same with the usercontrol without needing to refresh the whole page.

I'm fairly sure this can be achieved with event handlers but i'm having trouble getting them to work as i need to get an instance of the control in my results module. Page.FindControl("mycontrol") doesn't work.

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Communication between a module and Custom Controls in the skin?Communication between a module and Custom Controls in the skin?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, 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 DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out