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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Module Action to call a server eventModule Action to call a server event
Previous
 
Next
New Post
4/27/2007 7:00 AM
 

Hi,

I want to use a Module Action just like a normal command button click event - I have a method on the same page and do not want it to redirect anywhere, I just want it to call my method as if it were a normal command button.

There is nothing about this in the Module Config Guide - is it possible, or can Module Actions only redirect to pages?

 

 


Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
New Post
4/27/2007 7:46 AM
 

The Module Action buttons doesn't redirect directly to a page. A postBack is called by example :

__doPostBack('dnn$ctr383$dnnACTIONBUTTON1$lnk0','')

You can catch the postback target here. This is for the lazy method.

Now the Module Action buttons are defined in the module container skin. You can make your own skin and add the required controles and code to perform that action. I know the container skin is not designed to get functionality from the module, so if you don't want to change the skin, you can still add controls from your module on the parent control and add some event on it. Personnally I didn't tryed to see what will happen... But it should work.

this.Parent, is maybe not enough to get the Skin container from your module. You need to get all parents till you get the container. Typically the parent control of the module will be the content Panel of the container skin.   Like here below as found in the DNNblue.container . You need to get this.Parent.Parent to have an instance of the container skin in our example.

 

<TD id="ContentPane" runat="server" align="center"></TD>

Just be sure that controls are created on the Onload event of the control.

 

 
New Post
4/27/2007 7:49 AM
 

But this all is dependent of the skin... So maybe the lazy method is best if it's for a reusable skin :-) the target of the postback could be retrieved with Request.Form["__EVENTTARGET"];

 

 

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Module Action to call a server eventModule Action to call a server event


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