I\'m trying to develop a MultiLanguage web site using ASP.NET with C# My problem is: I want to make my MasterPage support switching among languages, but when i put the \"Ini
The method InitializeCulture() exists only on the Page class, not the MasterPage class, and that's why you get that error.
To fix this, you could create a BasePage that all your specific pages inherit:
BasePage, or whatever you want.BasePage.Here's an example:
public class BasePage : System.Web.UI.Page
{
protected override void InitializeCulture()
{
//Do the logic you want for all pages that inherit the BasePage.
}
}
And the specific pages should look something like this:
public partial class _Default : BasePage //Instead of it System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//Your logic.
}
//Your logic.
}