开发者

Escape special characters

开发者 https://www.devze.com 2022-12-16 06:50 出处:网络
My code below see开发者_如何学运维ms to be encoding special charcters how do I get it to escape these?

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

精彩评论

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

关注公众号