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

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...get ModuleID in HttpHandlerget ModuleID in HttpHandler
Previous
 
Next
New Post
8/9/2010 8:18 AM
 
Hello everybody,

I have a module with HttpHandler inside. DNN User Control has ability to get ModuleID using 'this.ModuleID' (C#). By obvious reasons this code is not actual inside HttpHandler.

How can i get ModuleID value inside HttpHandler code?

Thanks, Dmitry.
 
New Post
8/9/2010 3:22 PM
 
typically the easiest way is to extract it from the querystring i.e. If Not IsNothing(context.Request.QueryString("mid")) Then Integer.TryParse(context.Request.QueryString("mid"), ModuleId) End If

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
8/9/2010 4:24 PM
 
Does this work even if you have friendly URLs turned on?

Best wishes,
- Richard
Agile Development Consultant, Practitioner, and Trainer
www.dynamisys.co.uk
 
New Post
8/9/2010 4:45 PM
 
yes, AFAIK as it's available prior to the rewrite. Alternatively you can check for a httpcontext, and extract the portalsettings cache from the item collection get the activetab

Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
8/10/2010 8:32 AM
 
cathal connolly wrote:
yes, AFAIK as it's available prior to the rewrite. Alternatively you can check for a httpcontext, and extract the portalsettings cache from the item collection get the activetab

 I've tried to do it using  next statement 'DotNetNuke.Entities.Portals.PortalController.GetCurrentPortalSettings().ActiveTab.ModuleID'. But it is equal to -1 all the time.

Previous realization is not good, i think.

 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...get ModuleID in HttpHandlerget ModuleID in HttpHandler


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