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  |  

AppTheory specializes in solutions based on the DotNetNuke platform and has 2 employees on the DotNetNuke Core Team.
  Ads  
Aspose - The .NET & Java component publisher
 


  Sponsors  

Meet Our Sponsors

Salaro -- Skins and more
OnyakTech
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.
SteadyRain
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  How to get portal path from controller?
Previous Previous
 
Next Next
New Post 10/17/2007 6:50 AM
User is offline onishiro
143 posts
9th Ranked


How to get portal path from controller? 

Hello.

I need to get the path to the portal from my Controller class, for instance: "C:\inetpub\wwwroot\DNN\Website\Portals\0"

How can I get the path?

Thanks in advance.

 
New Post 10/17/2007 6:59 AM
User is offline Michael Washington
2842 posts
ADefWebserver.com
5th Ranked










Re: How to get portal path from controller? 

The easiest way it to simply pass the path to the Controller class. I would NOT recommend that you go directly to the database and try to figure it out because the database schema changes frequently.



Michael Washington
* ADefWebserver.com
* DNN Module Developer's Guide
* IWEB - DNN Web Services
* Silverlight and DotNetNuke
 
New Post 10/17/2007 7:00 AM
User is offline John Mitchell
3867 posts
www.snapsis.com
4th Ranked




Re: How to get portal path from controller? 

Server.MapPath(PortalSettings.HomeDirectory)


 
New Post 10/17/2007 7:02 AM
User is offline Michael Washington
2842 posts
ADefWebserver.com
5th Ranked










Re: How to get portal path from controller? 

 John Mitchell wrote

Server.MapPath(PortalSettings.HomeDirectory)

Did I misunderstand? I was thinking that the module's Controller class would not know what portal it was being called from.



Michael Washington
* ADefWebserver.com
* DNN Module Developer's Guide
* IWEB - DNN Web Services
* Silverlight and DotNetNuke
 
New Post 10/17/2007 7:08 AM
User is offline John Mitchell
3867 posts
www.snapsis.com
4th Ranked




Re: How to get portal path from controller? 

Come to think of it, there is also a property that is already mapped to a physical location:

PortalSettings.HomeDirectoryMapPath


 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  How to get portal path from controller?
 


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.

 


Active Modules, Inc.
Creators of Active Forums, the best forum module for DotNetNuke
www.activemodules.com
DotNetNuke Marketplace - Modules & Skins
The DotNetNuke Marketplace is the official e-commerce gateway for the DNN ecosystem. It's the place to buy and sell DotNetNuke modules, DotNetNuke skins, and other DNN offerings.
DotNetNuke Marketplace
ExactTarget Email Marketing Software and Solutions
ExactTarget delivers on-demand email software solutions for permission-based email marketing. ExactTarget offers solutions that meet the needs of all industry verticals and all size organizations, including SMB, corporate divisions, not-for-profits, large retail/direct marketers, agencies and enterprises.
ExactTarget.com

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