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.0newbie question: getting tabid and portalsettings?newbie question: getting tabid and portalsettings?
Previous
 
Next
New Post
9/6/2007 9:42 AM
 

sorry for the dumb question, but can someone provide me with a few lines of c# that will get me access to the portalsettings object and view the tabid? what namespaces do I need? basically, i need the tabid of the current page and that's about it, but in c#. thanks!

ryan

 
New Post
9/6/2007 5:18 PM
 

Hi Ryan,
  Are you writing a new module?
if so, you should be inheriting the "PortalModuleBase" class.

This class will set all of the values you need so you really don't have to call anything.

using "this.TabId" should get you the current tab id.  If that doesn't work for some reason, the object "PortalSettings" should already be set for you and you can use "PortalSettings.ActiveTab.TabId"  OR if for some reason that is not set (should be), you can get the Portal Settings with the Controller:
PortalSettings ps = PortalsController.GetCurrentPortalSettings();

Then using ps.ActiveTab.TabId should do it.

The first option should work, but if not there are a could more for ya.

Hope that helps!

 
New Post
9/8/2007 2:43 PM
 

hi Ryan,

do you know at what stage. the portalsettings get its value. i checked the proccess of the portal base page class. and also the portal controler. and i found that they are taking these settings and other global objects from:

HttpContext.Current.Items("xxxx") and casting these values into the suitable type like portalsttings but where and in wich vb file these items are filled and loaded. is there any httpmodule. if yes which one. is in at the authentication stage. ...??

thanks

 
New Post
9/8/2007 3:00 PM
 

hi all.

found the answer of my question.

since request has a URL rewriteing http module handler. i found that the portalsettings is re filled again in the event onBeginRequest

 

Dim _portalSettings As PortalSettings = New PortalSettings(TabId, objPortalAliasInfo)"PortalSettings", _portalSettings)

app.Context.Items.Add(

 

looks intereasting ;)

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0newbie question: getting tabid and portalsettings?newbie question: getting tabid and portalsettings?


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