473,657 Members | 2,496 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Setting the Page Title using local resources for a content page in a master page


I need to set the page title for a content page in a master page, and do
that using local reources so that I can have my page title in different languages.

I can do that easily using global resources by explicitly setting the value
of the Page, but I want to use local resources as a standard.

Thank you.
Jul 3 '06 #1
3 5376
Hi Laith,

Thank you for your post.

Based on my understanding, your question is how to use local resources to
set the content page's title. If I've misunderstood anything, please feel
free to post here.

Please use following steps to use local resources to set content page's
title:
1) In the folder where the content page resides, create a subfolder
"App_LocalResou rces" if it doesn't exist yet;
2) In the subfolder, create a resource file named after the content page
file name, for example: "Default2.aspx. resx", and create a resource key
"PageTitle" , set its content to your desired page title.
3) In the content page declaration, use following code to use the resource:

<%@ Page Language="C#" MasterPageFile= "~/MasterPage.mast er"
UICulture="auto " AutoEventWireup ="true" CodeFile="Defau lt2.aspx.cs"
Inherits="Defau lt2" Title="<%$ Resources:PageT itle %>" %>

If you want to add additional languages, just add more
"Default2.aspx. ??.resx" to the "App_LocalResou rces" subfolder. You also
need to set UICulture="auto " in the @ Page directive or include a
<globalizatio n uiCulture="auto "/element in web.config if you need to use
different resources by client browser settings.

Hope this helps. Please feel free to post here if anything is unclear.

Regards,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== =====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 4 '06 #2
Hello Walter Wang [MSFT],

It did the job, thanks!
Hi Laith,

Thank you for your post.

Based on my understanding, your question is how to use local resources
to set the content page's title. If I've misunderstood anything,
please feel free to post here.

Please use following steps to use local resources to set content
page's
title:
1) In the folder where the content page resides, create a subfolder
"App_LocalResou rces" if it doesn't exist yet;
2) In the subfolder, create a resource file named after the content
page
file name, for example: "Default2.aspx. resx", and create a resource
key
"PageTitle" , set its content to your desired page title.
3) In the content page declaration, use following code to use the
resource:
<%@ Page Language="C#" MasterPageFile= "~/MasterPage.mast er"
UICulture="auto " AutoEventWireup ="true" CodeFile="Defau lt2.aspx.cs"
Inherits="Defau lt2" Title="<%$ Resources:PageT itle %>" %>

If you want to add additional languages, just add more
"Default2.aspx. ??.resx" to the "App_LocalResou rces" subfolder. You
also need to set UICulture="auto " in the @ Page directive or include a
<globalizatio n uiCulture="auto "/element in web.config if you need
to use different resources by client browser settings.

Hope this helps. Please feel free to post here if anything is unclear.

Regards,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support
=============== =============== =============== =====
When responding to posts, please "Reply to Group" via your newsreader
so
that others may learn and benefit from your issue.
=============== =============== =============== =====
This posting is provided "AS IS" with no warranties, and confers no
rights.

Jul 5 '06 #3
Hi,

Appreciate your update and response. I am glad to hear that the problem has
been fixed. If you have any other questions or concerns, please do not
hesitate to contact us. It is always our pleasure to be of assistance.

Have a nice day!

Regards,
Walter Wang (wa****@online. microsoft.com, remove 'online.')
Microsoft Online Community Support

=============== =============== =============== =====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=============== =============== =============== =====

This posting is provided "AS IS" with no warranties, and confers no rights.

Jul 6 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
2428
by: Nathan | last post by:
Hi, I seem to having a peculiar problem with the display of odd and even pages in XSL-FO. Here is a small background of the problem. My xsl stylesheet mentions my fo:layout-master-set as <fo:layout-master-set> <fo:simple-page-master margin-left="0.5in" margin-right="0.5in" page-width="8.5in" margin-bottom="0.5in" master-name="Section-odd-page" margin-top="0.5in" page-height="14in"> <fo:region-after region-name="xsl-region-after-odd"
2
3723
by: dotnetjose | last post by:
Hi Folks, My subject message pretty musch explains it. By Default the Form definition sits at the Master Page file. Is there a way I can access the setting from my Content Page that uses a Master Page? Thanks in advance.
2
6978
by: SR | last post by:
I have started a web site using ASP.NET 2.0. I would like to centralize all of my classes in a StyleSheet but I cannot figure out how to link the StyleSheet to a Content Page since there is no header. I tried to put the link tag in the Master page, but the classes are not recognized in the Content Page. How do I use a StyleSheet with the Content Page? TIA
1
1948
by: GTB | last post by:
Hi, I have a master page, with a single content placeholder. I create a content page for it with some appropriate content. At this point everything is working fine. However I need to change the type of my content page to use my own BasePage class that contains a lot of code for handling resources and web service calls. The PageBase class inherits from System.Web.UI.Page.
3
1267
by: Mike P | last post by:
How do you set the title of content pages? I can set the title of my master pages, but I want each of my content pages to have a different title. *** Sent via Developersdex http://www.developersdex.com ***
6
1874
by: Rippo | last post by:
Is it possible to turn off the title tag in the page directive when using master pages? We have got meta data and title defined in a content control and are ending up with 2 title tags, one defined in our content and an emty one defined by the page directive. Can anyone help??
8
13515
by: Amit | last post by:
I have a master page and a content page but the stylesheet isnt getting applied like how it looks in visual studio design view. The master page is defined like this: <%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1
1865
by: Asif | last post by:
Hi All, I did follow the MSDN article (http://msdn2.microsoft.com/en-us/ library/ms379585(VS.80).aspx ) for overriding Master Page properties by setting page title and other Meta information( Keyword and Description) for individual content page by writing the following line on Page_Load event in content page Sub Page_Load()
3
4412
by: premprakashbhati | last post by:
hi, good evening.. i am going to upload an image in a web form .....for that iam using HTML input(file) control and one web control button i.e., Upload_Button() here is the code ...its work fine when iam using a normal web page... but can't in content page.... Code in Master Page <%@ Master Language="C#" AutoEventWireup="true" CodeFile="submaster.master.cs" Inherits="submaster" %> <%@ Register Assembly="AjaxControlToolkit"...
0
8421
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8844
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8742
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8621
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6177
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5643
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4173
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4330
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1734
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.