开发者

HtmlEncode text in DetailsView in ASP.NET

I开发者_运维百科 have taken over a project where HtmlDecode has been run on all data in the database. I will now use the asp:DetailsView to edit the data. The problem is that the asp:BoundField does not encode the data so that it appears correctly in edit mode. How do I solve that?


You should be able to set the HtmlEncode property on the asp:Boundfield to true. When this property is set to true, the data will be encoded before it appears.

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.boundfield.htmlencode.aspx

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜