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.0Redirect to different module from current module where both modules are in different tabs.Redirect to different module from current module where both modules are in different tabs.
Previous
 
Next
New Post
12/8/2008 10:23 AM
 

Hello,

I have created two modules. A and B.  Now created two pages Page1 and Page2 (two different tabs). 

I have installed module 'A' into Page1 (Tab1)  AND   module 'B' into Page2 (Tab2).

Now in module 'A' on Page1(Tab1) there is a button and when user clicks on button, it should redirect to Page2(Tab2) and module 'B' should comes into display.  Means, Tab2 should display with module 'B'.

how this can achieve.  that ie., open another tab from current tab.

Hope the question is clear, thanks ...

 

 
New Post
12/8/2008 10:41 AM
 

One option is to use the NavigateURL method:

Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(TABID_FOR_TAB2_GOES_HERE))

The Other option is to first find the other module and then redirect.  This way you don't have to think about the specific tab ID.  NOte this will find the first instance of module B, if you have 2 module B's in you site, you need to do something else (like aboe) to go to the 2nd one.

ModuleController mc = new ModuleController();
ModuleInfo mi = new ModuleInfo();
mi=mc.GetModuleByDefinition(PortalId, "FREINDLY_NAME_FOR_MODULE_B");

Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(mi.TabID));

 

Edit: Here is the code in VB.net:

Dim mc As DotNetNuke.Entities.Modules.ModuleController = New DotNetNuke.Entities.Modules.ModuleController()
Dim mi As DotNetNuke.Entities.Modules.ModuleInfo = New DotNetNuke.Entities.Modules.ModuleInfo()
mi = mc.GetModuleByDefinition(PortalId, "FREINDLY_NAME_FOR_MODULE_B")
 

 


Eric Shafer
Houston Web Designer
Click and Create

281-206-2631
 
New Post
12/10/2008 4:23 AM
 

My opinion is if you have target page, then you should create one Settings page to register which tab do you want to redirect to.

The layout can be like this :

Target Tab : [dropdownlistControl_for_tabs]

Target Module : [dropdownlistControl_for_modules_in_selected_tab]

Update

Then you save tabId from selected tab and moduleId from selected module in selected tab.

By using settings, you got a benefit that you don't have to hardcode your link to target page.

Just create link like this :

int tabid = Convert.ToInt32(Settings["TABID_FOR_TARGETPAGE"].ToString());
int moduleid = Convert.ToInt32(Settings["MODULEID_FOR_TARGETPAGE"].ToString());

string url = Globals.NavigateUrl(tabid, "Control_Key_If_Any", "mid=" + moduleid.ToString());

Response.Redirect(url);

HTH.

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Redirect to different module from current module where both modules are in different tabs.Redirect to different module from current module where both modules are in different tabs.


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