我有一些旧的 sitecore asp net 应用程序。而且我发现在布局(aspx)上我有应该改变网站语言的 ImageButton 控件。
    protected void btnLanguage_Click(object sender, EventArgs e)
    {
        ImageButton flag = (ImageButton)sender;
        if (string.IsNullOrEmpty("") == false)
        {
           UserContext.CurrentCulture = LanguageManager.GetLanguage(flag.CommandArgument);                     
        }
        else
        {
            SC.Context.Language = LanguageManager.GetLanguage(flag.CommandArgument);
        }
    }
但是我有很多控件应该在调用此事件后进行翻译。通过 asp 网页生活方式过程,这不是好的行为,但无论如何我需要用它做点什么。在我的情况下,最好的方法是什么?应该如何以正确的方式完成?