Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
I have the following code. The culture is set to en-US because the site is in English but I have peoples name to be in uppercase which are Turkish.
How do I uppercase the item.memberName in another culture like tr-TR
Thanks,
@{ var selection = CurrentPage.Children("TeamMember").Where("Visible"); } @if (selection.Any()) { @foreach (var item in selection) { <h3>@item.memberName</h3> } }
Could this maybe work?
@using System.Globalization @item.memberName.ToUpper(new CultureInfo("tr-TR", false));
Thanks Dennis but I already tried that. I get the following error
TeamCarousel.cshtml(16): error CS0246: The type or namespace name 'CultureInfo' could not be found (are you missing a using directive or an assembly reference?)
Did you use the @using statement that i wrote above?
@using System.Globalization
or use without using namespace directive:
@item.memberName.ToUpper(new System.Globalization.CultureInfo("tr-TR", false));
Thanks again you are right I missed that :)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
toUpper() in a different culture
Hi,
I have the following code. The culture is set to en-US because the site is in English but I have peoples name to be in uppercase which are Turkish.
How do I uppercase the item.memberName in another culture like tr-TR
Thanks,
Could this maybe work?
Thanks Dennis but I already tried that. I get the following error
TeamCarousel.cshtml(16): error CS0246: The type or namespace name 'CultureInfo' could not be found (are you missing a using directive or an assembly reference?)
Did you use the @using statement that i wrote above?
or use without using namespace directive:
Thanks again you are right I missed that :)
is working on a reply...