My master page has a few buttons to let the user choose his preferred culture.
protected void btnES_Click(object sender, EventArgs e)
{
Global.UserSession.Culture = "es-es";
Server.Transfer(Request.Path);
}
On a new page that I have just added, that displays a Google map, this code does not run. My breakpoints are not hit. However it does work for the rest of the site. Is there some link between the content and master pages that I am missing?
This is from my map page
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="MainMenu.master" CodeBehind="map.aspx.cs" Inherits="Choice.RI.UI.Map" %>
and this is from the master
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="MainMenu.master.cs" Inherits="Choice.RI.UI.MainMenu" %>
--- edit ---
there are no controls added programatically on the map page. all that I do on page load is to create a c# string object that contains the javascript to display the map and then I register it like this
ClientScript.RegisterStartupScript(this.GetType(), "mapInit", script, true);
and my last line of code which interferes with the master is this, which simply removes some css to make the map appear fuller on the browser
(Master as MainMenu).RemoveStylingForMapPage();
and something else, I don't know whether this matters, the map page contains no form element.