473,581 Members | 2,534 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Localization and Nested Master Pages


Sometime ago I followed an article (I believe MSDN) related with
localization in Asp.Net 2.0.

To make pages localization I create a class named Localization:

1 Public Class _Localization
2 Inherits Page
4 Sub Localization_Pr eInit(ByVal sender As Object, ByVal e As
EventArgs) Handles MyBase.PreInit
5 Page.MasterPage File = "~/_Base.master"
6 Page.Theme = "_Base"
7 End Sub
9 ' _Base master page culture
10 Protected Overrides Sub InitializeCultu re()
11 MyBase.Initiali zeCulture()
12 Dim language As String = CType(Context.P rofile,
ProfileCommon). Language
13 If (language IsNot Nothing) AndAlso (language <"Auto") Then
14 MyBase.UICultur e = language
15 Thread.CurrentT hread.CurrentCu lture =
CultureInfo.Cre ateSpecificCult ure(language)
16 End If
17 End Sub
19 End Class

My Base master page is as follows:

1 Partial Class _Base
2 Inherits System.Web.UI.M asterPage
3 ...
4 End Class

And my page is given by:

1 Partial Class _Default
2 Inherits Localization
3 ...
4 End Class

Well, now I need page Default to use two master pages. Base and Content


| ----- Content
Now I am really lost here. Smile

Could someone help me out in implementing this?

By the way, I am developing everything at runtime.



Nov 25 '06 #1
0 1636

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

Similar topics

by: Joseph Ferris | last post by:
Hello, I am having an issue with page breaking that I hope someone will be able to help me with. Still a relative "newbie", and I thought this might be a good place to find some help. I have a complex FO that contains nested tables. There are a few places where my breaks are not being rendered, although other ones work fine. I've made...
by: Steve Franks | last post by:
I have this cool nested master page scenario working great. However what is the correct way to be able to access a strongly typed property at the top level master from a content page that has a nested master page between the content page and the top level master? For example, assume the very top level master is called CompanyWide.master....
by: iturner100 | last post by:
Hi, I've been struggling with this one for a couple of hours without much joy. Basically, I've got a set of nested masterpages (3 as it happens). I'm dynamically generating a new page in code and want to be able to populate the ContentPlaceholders of the inner-most masterpage at run-time.
by: Rolf Welskes | last post by:
Hello, for a large web site project we would like to use nested Master Pages. Unfortunely VS2005 is not able to show pages in design mode when nested Master pages are used. This has the consequence that also each content page cannot be used in design mode. It is impossible to design hundrets of pages in source mode without design
by: shapper | last post by:
Hello, I am creating a web site with Nested Master pages. I also need to have a class where the culture is set. When the culture is changed by the user the page refreshes and the change takes effect. I saw this approach, I think, on a MSDN web site or blog: Config.vb Class where culture is set from profile value
by: Daniel Magliola | last post by:
I'm having a weird behaviour when implementing localization resource files in my website. This looks like a .Net bug to me, but it's too obvious to be there, so I must be overlooking something. I have the following file structure: + root folder |-----Masterpage.master |-----Somepage.aspx
by: shapper | last post by:
Hello, I am using ASP.NET 3.5 and VS 2008 to create 2 level Nested Master pages. I am adding the controls and the content place holders at runtime. However now my child pages do not recognize the master pages content place holders. How can I solve this?
by: daveh551 | last post by:
I've seen reference to Nested Master Pages in some of the documentation, but I haven't been successful in creating one in VS 2005 (Framework 2.0). I just did a search on it, and "How To: Walkthrough" on Master pages listed VS 2008 and Framework 3.5 as pre- requisites. If I do an "Add New Item" selecting "Master Page", the "Use MasterPage"...
by: daveh551 | last post by:
Okay, another problem I'm having with nested master pages on VS 2005. I've got a MasterPage,master, as SubMaster.master, and a DesignTime.master, and a content page, default.aspx. The DesignTime master is a single level master page incorporating both the content of the MasterPage and the SubMaster, so that I can get around the fact that...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
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. ...
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...
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...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
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...
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...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.