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
I would like to know how to count the number of characters of text in XSLT. Thank you very much!
You want to count umber of characters or display a certain amount of characters with xslt?
To find out the number of characters in text, you can use the "string-length" function.
<xsl:value-of select="string-length(propertyAlias)" />
Where 'propertyAlias' is the name of your property.
Thank you very much brother! Can you give me your email, so we can contact you?But is very annoying, I'd appreciate it a lot, thanks again!
My inbox is always open... http://j.mp/leeeeee
Hi, how would you go about doing this in Razor? I wan't to count the words in my bodyText and display it so visitors can see how long the text is. Thanks
Did you want a character count, or a word count?
For character count, it a simple string length:
For a word count, you'd need to define the word boundaries. A quick and dirty would be to split the string by spaces, then count the items:
For more advanced techniques, check this link: http://www.dotnetperls.com/word-count
Great, thanks Lee!
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted