开发者

Escape special characters

My code below see开发者_如何学运维ms to be encoding special charcters how do I get it to escape these?

 str1 += myGridView.Rows[idx].Cells[2].Text + ";";

When i check the grid view html source the table cell text is = 'http://news.google.co.uk/nwshp?ie=UTF-8&hl=en&tab=wn&q=Clifford+Chance&output=rss'

But the value for str1 is 'http://news.google.co.uk/nwshp?ie=UTF-8&hl=en&tab=wn&q=Clifford+Chance&output=rss;'

Many Thanks,


What you're seeing here is the HTML control encoding your text to HTML so it appears in the client's browser as it does in your string.

You can use HttpUtility.HtmlDecode(string) to decode an encoded string of HTML.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜