c# - Exclude UICulture string (ex: en-US) from URL generated by UrlHelper.Action? -


firstly, testing website url

http://localhost:51889/mvts 

despite currentuiculture string not being present in above url, when declare @url.action("actionone","user") in main.cshtml, ui culture string exists in script tag.

<script type="text/javascript" src='/mvts/en-us/user/actionone'></script> 

what wish able exclude "en-us" "src" in above tag looks this:

<script type="text/javascript" src='/mvts/user/actionone'></script> 

can please tell me how may accomplish this? have been searching while , haven't found solution yet.

check routes definition. have rule attribute {culture}.

you can delete attribute or, if need in other sections of application, can add route definition without culture and, in place of url.action, can use url.routeurl (giving, parameter, name of route definition).


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -