1

ASP.NET MVC 4 Web サイトの URL は、「/language/controller/action」のようになります。

メニューとフッターのリンクの HTML コードは同じです。

<li><a href="@Url.Action("WebsiteDevelopment", "Service", new { area = "" })">Website development</a></li>

「en-GB」カルチャリンクでサイトを開いたときのメニューへのピント

/en-GB/Service/WebsiteDevelopment

しかし、フッターのリンクは

/hy-AM/Service/WebsiteDevelopment

それはどのように可能ですか?どうすればこれを修正できますか?

4

2 に答える 2

0

You don't specify "language" in Url.Action, so it probably takes the default language. ASP.NET links are absolute ones, so without specifying the language, it's

/default-language/controller/action

If you want the language to be taken from the current URL, you need to write your own Url.Action function, or extend it.

于 2013-07-24T05:26:52.133 に答える