471,595 Members | 984 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,595 software developers and data experts.

Localization and Nested Master Pages

Hello,

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
3
4 Sub Localization_PreInit(ByVal sender As Object, ByVal e As
EventArgs) Handles MyBase.PreInit
5 Page.MasterPageFile = "~/_Base.master"
6 Page.Theme = "_Base"
7 End Sub
8
9 ' _Base master page culture
10 Protected Overrides Sub InitializeCulture()
11 MyBase.InitializeCulture()
12 Dim language As String = CType(Context.Profile,
ProfileCommon).Language
13 If (language IsNot Nothing) AndAlso (language <"Auto") Then
14 MyBase.UICulture = language
15 Thread.CurrentThread.CurrentCulture =
CultureInfo.CreateSpecificCulture(language)
16 End If
17 End Sub
18
19 End Class

My Base master page is as follows:

1 Partial Class _Base
2 Inherits System.Web.UI.MasterPage
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
where:

Base

| ----- 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.

Thanks,

Miguel

Nov 25 '06 #1
0 1530

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Joseph Ferris | last post: by
4 posts views Thread by Steve Franks | last post: by
2 posts views Thread by iturner100 | last post: by
1 post views Thread by shapper | last post: by
reply views Thread by Daniel Magliola | last post: by
1 post views Thread by shapper | last post: by
1 post views Thread by daveh551 | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by Anwar ali | last post: by

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.