如何跳过被复制到数据库中的选定html元素... [英] How to skip selected html elements being copied into database ...

查看:62
本文介绍了如何跳过被复制到数据库中的选定html元素...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

lblActionSummary.Text = Regex.Replace(lblActionSummary.Text,<。*?>,string.Empty);





我正在尝试这个..我不想把浏览器内容带到HTML元素...



但是如果信息有段落,某些空格,粗体和斜体元素。所有人都被跳过..我无法看到正确的观点。我只是不想在元素上显示背景颜色,因为我已经设置了背景颜色和一些字体颜色,除了它应该使用所有HTML标签。



请建议。

解决方案

请参阅我对该问题的评论。也许,你根本不应该跳过任何HTML标签。如果这只是背景颜色,那么你需要跳过(或转换)就是CSS。



我希望你的HTML使用CSS。 (如果颜色是以CSS以外的其他方式定义的,请考虑是否要浪费时间在垃圾上。)



-SA

lblActionSummary.Text=Regex.Replace(lblActionSummary.Text, "<.*?>", string.Empty);


I am trying this .. I don't want to take browser contents HTML elements ...

but then if the information has paragraphs, certain spaces, bold, and italic elements. All gets skipped .. And I am unable to see the proper view. I just don't want to display background color on elements because my background color is already set and some font color, other than that it should use all HTML tags.

Please suggest.

解决方案

Please see my comments to the question. Perhaps, you should not skip any HTML tags at all. If this is just the background colors, all you need to skip (or transform, for that matter), is CSS.

I hope your HTML uses CSS. (If colors are defined in some way other than CSS, think if you want to waste your time on such trash.)

—SA


这篇关于如何跳过被复制到数据库中的选定html元素...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆