CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!



Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 4/5/2006 10:36:56 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 7 Views: 35 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
8 Items, 1 Pages 1 |< << Go >> >|
TheGrox
Asp.Net User
Untitled Page using Master Pages4/5/2006 10:36:56 AM

0/0

I've read through a few posts about getting the title of content pages to display correctly but still am stumped.

My Master Page has the following code:

<head runat="server">

<title>Widgets</title>

<link href="Styles.css" rel="stylesheet" type="text/css" />

</head>

and my content pages have the following code in page load (using VB):

Page.Title = Me.Master.Page.Title & " - Test Email Settings"

Once this page is rendered though, the title comes out as 'Untitled Page - Test Email Settings'. What exactly do i need to do to get the bit from the master page displayed? It should be 'Widgets - Test Email Settings'.

From the posts i've read, i'm sure i'm doing the right thing, the head tags of the master runat server and the content page has no title declaration bar the page load code but just cant get it to work! Tried setting <title runat="server">Widgets</title> in the master too, but no joy with that either.

Thanks.

orzeh
Asp.Net User
Re: Untitled Page using Master Pages4/5/2006 9:17:49 PM

0/0

hi!

Me.Master.Page.Title returns title of actual content page (set in <%Page > tag). MasterPage doesn`t have a title property.

orzeh


code less, think more!
Durbs222
Asp.Net User
Re: Untitled Page using Master Pages4/6/2006 12:35:02 PM

0/0

Is there no way at all to get the title from the master page then and use it within the content pages then? Or do all content pages need to have their title explicitly defined on a per page basis?
orzeh
Asp.Net User
Re: Untitled Page using Master Pages4/6/2006 6:14:56 PM

0/0

hi!
You can add "virtual master page title" to web.config and then use it in content pages...

orzeh


code less, think more!
KowDot
Asp.Net User
Re: Untitled Page using Master Pages4/20/2006 12:26:18 AM

0/0

Hi!

I'm trying to do the same thing.

How do you add "virtual master page title" to web.config and use it in content pages?

Thanks,

KowDot

sjmueller
Asp.Net User
Re: Untitled Page using Master Pages4/20/2006 4:01:52 AM

0/0

I'm confused.  Since the master page is not ever used alone, and I'm pretty sure that you aren't trying to have a dynamic title inside of your master page, why not just expose a public string property within the master class?
orzeh
Asp.Net User
Re: Untitled Page using Master Pages4/20/2006 7:54:06 AM

0/0

KowDot:

Hi!

I'm trying to do the same thing.

How do you add "virtual master page title" to web.config and use it in content pages?

Thanks,

KowDot



hi!

use appSettings section:

<appSettings>
        <add key="MasterTitle" value="My Page Title/>
</appSettings>

then in code:
Page.Title = ConfigurationManager.AppSettings("MasterTitle") + "some subtitle";

hope it helps
orzeh


code less, think more!
KowDot
Asp.Net User
Re: Untitled Page using Master Pages5/26/2006 3:21:46 AM

0/0

I was indeed a little confused but figured it all out now - appSettings are very very useful. Thanks for help.
8 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Professional C# 2005 with .NET 3.0 Authors: Christian Nagel, Bill Evjen, Jay Glynn, Karli Watson, Morgan Skinner, Pages: 1748, Published: 2007
Beginning ASP.NET 2.0 Authors: Chris Hart, John Kauffman, Chris Ullman, David Sussman, Pages: 759, Published: 2005
Beginning ASP.NET 2.0 in VB 2005: From Novice to Professional Authors: Matthew MacDonald, Pages: 1063, Published: 2006
Microsoft Visual C# 2005 Unleashed Authors: Kevin Hoffman, Pages: 692, Published: 2006
Beginning Visual Web Developer 2005 Express: From Novice to Professional Authors: Paul Sarknas, Rick Delorme, Pages: 334, Published: 2005
Learning ASP.NET 3.5 Authors: Jesse Liberty, Dan Hurwitz, Brian MacDonald, Pages: 576, Published: 2008
Beginning ASP.NET 2.0 in C# 2005: From Novice to Professional Authors: Matthew MacDonald, Pages: 1148, Published: 2006
Beginning ASP.NET 3.5 in C# 2008: From Novice to Professional Authors: Matthew MacDonald, Pages: 954, Published: 2007
Beginning ASP.NET 3.5 in VB 9.0: From Novice to Professional Authors: Matthew MacDonald, Pages: 1149, Published: 2007
Professional C# 2005 Authors: Christian Nagel, Bill Evjen, Jay Glynn, Karli Watson, Morgan Skinner, Allen Jones, Pages: 1540, Published: 2006

Web:
Master Pages In ASP.NET 2.0 Jul 18, 2005 ... We can also assign a default master page for all web forms in a site in our web. config file using the element. ...
ASP.Net 2.0 - Master Pages: Tips, Tricks, and Traps Apr 11, 2006 ... AutoEventWireup="true" Title="Untitled Page" %> ...... Master pages use the theme specified by the page that is using them. ...
Creating a Site-Wide Layout Using Master Pages : The Official ... We discuss how master pages work, look at creating a master page and associated content pages using Visual Web Developer, and see how changes to a master ...
Wrox Article : Using ASP.NET Master Pages for Consistent Site ... Using ASP.NET Master Pages for Consistent Site Design. By Jacob J. Sanford. Creating one page (Default.aspx) that is aesthetically pleasing, easy to use by ...
MCMS faq.com - Using ASP.NET Master Pages in your MCMS Applications Dec 5, 2005 ... From this Master Page, new Content Pages can be created which .... that the Master Page element contained the text Untitled Page. ...<br /><a href="http://www.codeguru.com/csharp/sample_chapter/article.php/c14081" title="CodeGuru: Using ASP.NET Master Pages for Consistent Site Design" target="_" ><b>CodeGuru: Using ASP.NET Master Pages for Consistent Site Design</b></a> NET master pages to consistently format the design of your pages around your ... Inherits="_Default" Title="Untitled Page" %> <asp:Content ID="Content1" ...<br /><a href="http://www.devasp.net/net/articles/display/201.html" title="Using Master Pages in ASP.NET 2.0, A Premier - .Net Articles & Samples" target="_" ><b>Using Master Pages in ASP.NET 2.0, A Premier - .Net Articles & Samples</b></a> This article will get you up and running with using master pages introduced in .... CodeFile="Authors.aspx.vb" Inherits="Authors" title="Untitled Page" %> ...<br /><a href="http://download.microsoft.com/download/8/f/6/8f6349e4-6554-405a-bcd7-9b094ba5089a/ASPNET_MasterPages_Tutorial_01_VB.pdf" title="Master Pages :: Creating a Site-Wide Layout Using Master Pages ..." target="_" ><b>Master Pages :: Creating a Site-Wide Layout Using Master Pages ...</b></a> We will look. at using nested master pages in a future tutorial. Figure 2 shows what the master page for www.asp.net might look like. Note that the master ...<br /><a href="http://www.tech-archive.net/Archive/DotNet/microsoft.public.dotnet.framework.aspnet/2007-07/msg00565.html" title="Re: Events refuse to fire when using master pages" target="_" ><b>Re: Events refuse to fire when using master pages</b></a> Jul 5, 2007 ... WebForm1" Title="Untitled Page" %> .... I have a page that is using master pages . I have a button in the content page, but it refuses to ...<br /><a href="http://www.brainbell.com/tutorials/ASP/ASP.NET_2.0_Master_Pages.html" title="ASP - ASP.NET 2.0 Master Pages Tutorials" target="_" ><b>ASP - ASP.NET 2.0 Master Pages Tutorials</b></a> Because Master Pages play a part in how the final page handler is ... the Master Page injects its own content into the ASPX page using the Master Page. ...<br /></div></td> <td valign="top"> <script type="text/javascript"> lqm_channel = 1; lqm_publisher = 303; lqm_zone = 1; lqm_format = 7; </script> <script type="text/javascript" src="http://a.lakequincy.com/s.js"></script></td> </tr></table> <br /> <table width="100%"> <tr> <td style="width: 50%"> </td> <td> </td> </tr> </table> <br /> <div style="text-align:center"> <br /> <br /> <b>Search This Site: </b> <input type="hidden" name="cx" value="001993386287184627138:djlrq6ok3yq" /> <input type="hidden" name="cof" value="FORID:10" /> <input type="text" name="q2" id="q2" size="25" onkeypress="if(event.keyCode == 13){SearchSite('q2');return false;}" value="" /> <input type="button" name="sa" value="Search" class="Button" onclick="SearchSite('q2');" /> </div> <br /> <script type="text/javascript"> function doSubscribe(S, E){ DoSubscribe(590325, S,E); } function doFavorite(S, E){ DoFavorite(590325, S,E); } </script> </td> <td id="rightPanel" valign="top" > <div style="width: 125px; text-align: right; overflow:hidden "> <div style="text-align: left; font-weight: bold; margin-left: 15px"><br /> <br /><br /> <img src="http://www.codeverge.net/images/icons/envelope2.gif" /> <a rel="nofollow" onclick="OpenInviteWin();">Invite</a><br /> <img src="http://www.codeverge.net/images/icons/folders.gif" /> <a href="../History/history_items.aspx" id="ctl00_CPH_RightMenu_A2" rel="nofollow">History</a> <br /> <img src="http://www.codeverge.net/images/icons/books.gif" /> <a href="../resources/computers" id="ctl00_CPH_RightMenu_A1">Resources</a><br /> <img style="border:0px" src="http://www.codeverge.net/images/icons/user2.gif" /> <a href="../members.aspx" id="ctl00_CPH_RightMenu_A6">Members</a><br /> <img src="http://www.codeverge.net/images/icons/statements.gif" /> <a href="../sitemap/SiteMap.aspx" id="ctl00_CPH_RightMenu_A5" rel="nofollow">SiteMap</a> </div> <br /> <br /> <script type="text/javascript"> lqm_channel = 1; lqm_publisher = 303; lqm_zone = 1; lqm_format = 3; </script> <script type="text/javascript" src="http://a.lakequincy.com/s.js"></script> <br /><br /> <script type="text/javascript"> lqm_channel = 1; lqm_publisher = 303; lqm_zone = 1; lqm_format = 3; </script> <script type="text/javascript" src="http://a.lakequincy.com/s.js"></script> <br /><br /> <script type="text/javascript"> lqm_channel = 1; lqm_publisher = 303; lqm_zone = 1; lqm_format = 2; </script> <script type="text/javascript" src="http://a.lakequincy.com/s.js"></script> <br /><br /> <script type="text/javascript"> lqm_channel = 1; lqm_publisher = 303; lqm_zone = 1; lqm_format = 2; </script> <script type="text/javascript" src="http://a.lakequincy.com/s.js"></script> <div style="height: 100px"></div> <div><a href="http://www.codeverge.net/doc/mscorlib-1/M_System_Reflection_TypeDelegator_GetEvents.htm" >GetEvents Method </a><br /><br /><a href="http://www.codeverge.net/doc/mscorlib-1/AllMembers_T_System_Security_SecurityElement.htm" >SecurityElement Members</a><br /><br /><a href="http://www.codeverge.net/doc/mscorlib-1/M_System_Runtime_Serialization_SerializationInfo_GetUInt16_1_72eac341.htm" >GetUInt16 Method </a><br /><br /><a href="http://www.codeverge.net/doc/mscorlib-1/M_System_Threading_ThreadPool_GetAvailableThreads_2_9b3a083d.htm" >GetAvailableThreads Method </a><br /><br /><a href="http://www.codeverge.net/doc/mscorlib-1/AllMembers_T_System_Runtime_Remoting_Activation_IActivator.htm" >IActivator Members</a><br /><br /></div> <div style="width: 100px; overflow: hidden; text-align: left; padding: 5px; font-family: Arial;"> <br /> <a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/javascript-alert-in-content-page-load-blocks-css-formatting-of-master-page-after-content-block" title="javascript alert in content page load blocks css formatting of master page after content block" >javascript alert in content page load blocks css formatting of master page after content block</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/treeview-target-blank" title="treeview target=_blank" >treeview target=_blank</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/how-to-get-a-curent-theme" title="how to get a curent theme?!" >how to get a curent theme?!</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/q-how-to-disable-a-node-in-a-treeview" title="q: how to disable a node in a treeview?" >q: how to disable a node in a treeview?</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/theme-and-remotescript-problem" title="theme and remotescript problem" >theme and remotescript problem</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/templating-and-inherit-visual-layout-in-master-pages" title="templating and inherit visual layout in master pages" >templating and inherit visual layout in master pages</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/expand-and-collapse-in-tree-view-navigation-control" title="expand and collapse in tree view navigation control" >expand and collapse in tree view navigation control</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/urgent-masterpage-bulletedlist-event" title="urgent: masterpage bulletedlist event" >urgent: masterpage bulletedlist event</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/background-image-on-a-masterpage" title="background image on a masterpage" >background image on a masterpage</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/some-questionable-remarks-in-the-sitemappath-document" title="some questionable remarks in the sitemappath document" >some questionable remarks in the sitemappath document</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/menu-control-not-seen-properly" title="menu control not seen properly" >menu control not seen properly</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/-sitemapprovider-class" title="-- sitemapprovider class" >-- sitemapprovider class</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/can-i-include-external-sites-in-sitemap-file-like-this-take-a-look-please" title="can i include external sites in sitemap file? like this: take a look please" >can i include external sites in sitemap file? like this: take a look please</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/how-can-i-do-these-a-menu-that-acts-like-a-treeview-or-a-treeview-that-acts-like-a-menu" title="how can i do these?: a menu that acts like a treeview, or a treeview that acts like a menu." >how can i do these?: a menu that acts like a treeview, or a treeview that acts like a menu.</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/master-page-control-web.sitemap-questions" title="master page control/web.sitemap questions" >master page control/web.sitemap questions</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/menu-web-control" title="menu web control" >menu web control</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/dynamic-menucontrol-in-masterpage-pushing-content" title="dynamic menucontrol in masterpage pushing content" >dynamic menucontrol in masterpage pushing content</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/problem-with-asp-menu,2" title="problem with asp:menu" >problem with asp:menu</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/content-control-values-in-form-submit" title="content control values in form submit" >content control values in form submit</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/sitemap-how-to-get-the-title-of-the-current-child-of-the-rootnode" title="sitemap : how to get the title of the current child of the rootnode" >sitemap : how to get the title of the current child of the rootnode</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/masterpages-in-adobe-contribute" title="masterpages in adobe contribute" >masterpages in adobe contribute</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/dynamic-menus,2" title="dynamic menus" >dynamic menus</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/menu-control-and-css" title="menu control and css" >menu control and css</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/using-a-background-image-in-the-menu-control" title="using a background image in the menu control" >using a background image in the menu control</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/allowing-unique-title-s-for-content-pages-that-implement-a-master" title="allowing unique <title>s for content pages that implement a master" >allowing unique <title>s for content pages that implement a master</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/making-of-new-themes-basics" title="making of new themes, basics" >making of new themes, basics</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/usage-of-1-masterpage-with-a-dynamic-banner-flash-banner-for-multiple-aspx" title="usage of 1 masterpage with a dynamic banner/flash banner for multiple aspx" >usage of 1 masterpage with a dynamic banner/flash banner for multiple aspx</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/web.sitemap-options-for-line-break" title="web.sitemap options for line break" >web.sitemap options for line break</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/menu-control-static-item-backgroung" title="menu control static item backgroung" >menu control static item backgroung</a><br/><br/><a href="http://www.codeverge.net/ng.asp-net-forum.master_pages_themes_and_navigation_controls/sitemap-and-treeview" title="sitemap and treeview" >sitemap and treeview</a><br/><br/> </div> </div> </td> </tr> <tr> <td id="leftBottom" valign="top" style="width: 100px">   </td> <td id="ctl00_centerBottom" valign="top" align="center"> <b> <a rel="nofollow" href='http://www.codeverge.net/sitemap/privacy.aspx'>Privacy</a> | <a rel="nofollow" href='http://www.codeverge.net/sitemap/contact.aspx'>Contact Us</a></b> <br /> All Times Are GMT </td> <td id="rightBottom" valign="top" style="width: 100px"> </td> </tr> </table> <script type="text/javascript"> //<![CDATA[ var _Rating_MemberRating = -1; var _Rating_tbl = document.getElementById('ctl00_CPH_centerFront_ctl28'); function Rating_RollRates(){ if(_Rating_tbl.rows.length < 10){ for ( i =10 ; i >0; i--){ setTimeout( function(){ var row = _Rating_tbl.insertRow(_Rating_tbl.rows.length); var cell = row.insertCell(0); cell.onclick = function(){Rating_RateIt(this.innerHTML);}; cell.innerHTML = 12 - _Rating_tbl.rows.length; cell.className = 'Rating_AvgRating'; if(cell.innerHTML == _Rating_MemberRating){ cell.title='My Rating'; cell.style.color='orange'; } }, (10-i) * 25); } setTimeout(function(){Rating_Close()},10000) } else{ Rating_Close() } } function Rating_Close(){ if(_Rating_tbl.rows.length > 1) for ( i =0 ; i < 10; i++) setTimeout(function(){ _Rating_tbl.deleteRow(_Rating_tbl.rows.length -1 )} , i * 25) } function Rating_RateIt(rating){ ItemPageWs.RateItem(590325, rating, function(A){ document.getElementById('ctl00_CPH_centerFront_ctl29').innerHTML ='('+ parseFloat(A[0]).toFixed(2) +', '+ A[1] +')'; _Rating_MemberRating = rating; Rating_RollRates(); AlertMsg('Your Rating Was Updated'); Afirm( document.getElementById('ctl00_CPH_centerFront_ctl29')); }); } RestrictHeights('tcContent');Sys.Application.initialize(); //]]> </script> </form> </body> </html> <script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=searchbox_001993386287184627138%3Adjlrq6ok3yq&lang=en"></script> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> var pageTracker = _gat._getTracker("UA-3447589-1"); pageTracker._trackPageview(); </script>