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  |  

$4.95 Windows Hosting at Webhost4life.com
  Ads  
Engage Software - Training Partner for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

MaximumASP
SourceGear - Tools for Developers
.: CounterSoft :.
telerik
ExactTarget email software solutions
Merak Mail Server
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Setting Container title dynamically
Previous Previous
 
Next Next
New Post 9/11/2006 12:32 PM
User is offline chris
2 posts
10th Ranked


Setting Container title dynamically 

Hi,

Is it possible to set the container title text dynamically from the module Page_Init or Page_Load code?

I have a controller class that switches views based on a query string parameter, but the trouble is that the container text is only set initially when the module is inserted on the page (in Admin mode). I don't see any member data in PortalModuleBase that would lead to container title access...

 

thanks,

Chris

 
New Post 9/11/2006 1:12 PM
User is offline chris
2 posts
10th Ranked


Re: Setting Container title dynamically 

Never mind, I got it working:

In the Page_Init event, set

PortalModuleBase.ModuleConfiguration.ModuleTitle = viewTitle;

viewTitle can be obtained from the ModuleControlInfo.ControlTitle property of the view control (loaded dynamically).

 
New Post 9/11/2006 8:51 PM
User is offline xiao qi
117 posts
www.DnnModules.cn
9th Ranked






Re: Setting Container title dynamically 

Maybe you can try this code, It's more flexible.

foreach (System.Web.UI.Control ctl in this.ContainerControl.Controls)
                {

                    if (ctl.ID == null)

                        continue;

                    if (Regex.IsMatch(ctl.ID, "dnnTITLE"))
                    {

                        Label lbTitle = (Label)ctl.FindControl("lblTitle");

                        lbTitle.Text = "foo";

                    }

                }

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Setting Container title dynamically
 


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
DNNCovered.com - Your Offshore Dotnetnuke Partner
Dnncovered.com is the only Dotnetnuke offshore outsourcing center specializes in DNN skinning and module development with lowest pricing and quality service. Our staff is dedicated to websites based on DNN and our graphic designers are creative and imaginative well enough to provide customers the complete set of skinning solutions and packages
www.dnncovered.com
PointClick.Net DNN Solutions
DotNetNuke Hosting Platform for Business and personal use.
PointClick.Net Hosted Solutions

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