我有带有文化选择器控件的页面。此控件在布局页面上呈现为部分。
@Html.Partial("~/Views/Shared/CultureChooserUserControl.cshtml")
文化选择器控件如下所示:
@Html.ActionLink("English", "ChangeCulture", "Default", new { lang = "en", returnUrl = this.Request.RawUrl }, new { @class = "englishFlagButton" })
@Html.ActionLink("Deutsch", "ChangeCulture", "Default", new { lang = "de", returnUrl = this.Request.RawUrl }, new { @class = "germanFlagButton" })
@Html.ActionLink("French", "ChangeCulture", "Default", new { lang = "fr", returnUrl = this.Request.RawUrl }, new { @class = "frenchFlagButton" })
@Html.ActionLink("Italian", "ChangeCulture", "Default", new { lang = "it", returnUrl = this.Request.RawUrl }, new { @class = "italianFlagButton" })
文化改变方法在页面的默认控制器中,当我想改变文化时,它给出了以下内容:
http://localhost/myapp/Default/ChangeCulture......
现在我将我的网站与区域分开,问题是当我在一个区域中尝试改变文化时,请求是错误的,这会导致错误:
http://localhost/myapp/**AREA/Default**/ChangeCulture.....
我怎样才能解决这个问题。提前感谢您的支持。
坦率。