Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Localization and Nested Master Pages

Reply
Thread Tools

Localization and Nested Master Pages

 
 
shapper
Guest
Posts: n/a
 
      11-25-2006
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using update panel with master & nested master pages katmagic ASP .Net 0 12-26-2008 07:41 PM
Strange behaviour with localization and Master Pages Daniel Magliola ASP .Net 0 04-09-2007 07:20 AM
Cross Page Post Back When Using Mixture of Master Pages and Non-Master Pages Jason@webbit.com ASP .Net 1 05-16-2006 02:00 PM
Problems with IE and nested Master Pages Mr. K.V.B.L. ASP .Net 0 03-06-2006 03:32 PM
seeking servlet "Master" keep getting "Master/servlet/Master" not found. Tomcat 5.0.25 Doug McCann Java 1 08-05-2004 09:16 PM



Advertisments