In my previous article I have explained about Read cookies value using C#.net Asp.Net. In this article I am going to explain the replace functionality using xslt.
I need to replace space with – symbol in my input. So I wrote a below template to do this operation.
Now I have called the function like below mentioned.
Now if we print the value of myVar then it will be This-is-a-sample-text-with-space
But if you like to replace only one character then you can use translate the method instead of the above method. Below is the sample code.
Please note that method translate will replace only one character.
Do you like this article? Help us to improve. Please post your comments below.