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  |  

PortalWebHosting
  Ads  
 


  Sponsors  

Meet Our Sponsors

Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
Salaro -- Skins and more
OnyakTech
CrystalTech Web Hosting™
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Get Tabid from pagename
Previous Previous
 
Next Next
New Post 3/31/2008 1:59 AM
Resolved
User is offline Peter
33 posts
10th Ranked


Get Tabid from pagename 

Hello,

I would like to know is there any way to get page tabid (but not now opened) by page name?

thanks in advance

 
New Post 3/31/2008 6:24 AM
User is offline William Severance
842 posts
www.wesnetdesigns.com
7th Ranked






Re: Get Tabid from pagename 

If the tab (page) name is unique across the portal, the following should work:

Dim tCtlr As New DotNetNuke.Entities.Tabs.TabController
Dim tInfo As DotNetNuke.Entities.Tabs.TabInfo = tCtlr.GetTabByName(tabName, PortalId)
Dim tID As Integer = -1
If Not tInfo Is Nothing Then
     tID = tInfo.TabID
End If

If the tab name is not unique - that is, it is used on multiple child pages, the method GetTabByName can take a third parameter - that of the ParentTabID.


Bill, WESNet Designs
 
New Post 3/31/2008 8:00 AM
User is offline Peter
33 posts
10th Ranked


Re: Get Tabid from pagename 

Thanks a lot, that is what I wanted :)

 
New Post 6/25/2008 3:39 PM
User is offline Willem Steyn
6 posts
10th Ranked


Re: Get Tabid from pagename 

William,

I saw your reply above.When I try it, all works accept the fact that "tabName" cannot be directly referenced like you show in the 2nd line of the code example.Error I get is that "tabName" is not declared, so I tried to reference it as tInfo.tabName.But then of course I get a warning that tInfo is being used without first being given a value, which allows for this to compile, but at runtime the object is null, failing the code. Any idea what I am doing wrong here?

Thanks in advance.

Willem Steyn

 
New Post 6/25/2008 4:15 PM
User is offline Willem Steyn
6 posts
10th Ranked


Re: Get Tabid from pagename 

Got it solved thanks. Had to use a slightly different approach:

Dim

tCtlr As New DotNetNuke.Entities.Tabs.TabControllerDim tInfo As DotNetNuke.Entities.Tabs.TabInfoTrue)

 

tInfo = tCtlr.GetTab(TabId, PortalId,

' tInfo.TabName.ToString ----->> Tabname in here

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Get Tabid from pagename
 


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.

 


Alliance Systems & Programming Inc
Alliance is not just our name... it's how we do business. We partner with our clients, learning their business processes and standards and then applying our expertise to help them improve their workflow and profitability.
www.Alliancesys.com
Customer Connect
Customer Connect provides cutting edge solutions that deliver sales, marketing and customer service results.
www.customer-connect.com
TechNexxus
Business process and technology sourcing solutions delivering superior people, process and value. We have used, and continue to use, DNN successfully in numerous client projects to deliver exceptional value. We are proud to support the DNN team and community.
www.technexxus.com

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