Quote:
yes it works but it is using plus sign, is there anyway i can encode with a minus sign or dash?
No, you can't do that directly.
But you can do like...
1.
How does Stack Overflow generate its SEO-friendly URLs?[
^]
OR
Just replace before encoding like...
<a href="Default.aspx?News=<%# HttpUtility.UrlEncode(XPath(" title=").ToString().Replace(" ", "_"))%>">
If you want to use Replace some characters again, then you can do like...
HttpUtility.UrlEncode(XPath(" title=").ToString().Replace(" ", "_").Replace("CharacterToReplace", "NewCharacter").Replace("CharacterToReplace", "NewCharacter"))
Use as many times you want. :)