If I understand right what you´re trying to do is remove spaces in a phone number. So if the phone number is 12 34 56 78 you will like to print it like 12345678
I think Jeavon suggestion is good if you´re using MVC as he said. But if you´re using Razor Macro (DynamicNode)
@{ var phone = Model.AncestorOrSelf(1).Phone.Replace(" ", ""); } <p>@phone</p>
from xslt to razor - umbraco.library:Replace
Hi
I just need to chance this line into razor
Thanks in advance :-)
/Kate
Hi Kate,
If you are using MVC, then I think this is equivalent
If you are using a Razor Macro (DynamicNode) let me know.
Jeavon
Hi Kate,
If I understand right what you´re trying to do is remove spaces in a phone number. So if the phone number is 12 34 56 78 you will like to print it like 12345678
I think Jeavon suggestion is good if you´re using MVC as he said. But if you´re using Razor Macro (DynamicNode)
/Dennis
Hi
thanks for your reply.
I use Razor Macro and Dennis, your solution works perfectly
Thanks again
/Kate
is working on a reply...