截取WINfrom中HTML的标签!!! - .NET技术 / C#
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Text.RegularExpressions;
using System.Web;
namespace WindowsApplication3
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public static string Ubb(string Htmlstring) {
Htmlstring = Regex.Replace(Htmlstring, @"<script[^>]*?>.*?</script>", "", RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring, @"<(.[^>]*)>", "", RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring, @"([\r\n])[\s]+", "", RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring, @"-->", "", RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring, @"<!--.*", "", RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring, @"&(quot|#34);", "\"", RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring, @"&(amp|#38);", "&
相关问答:
有个winform程序,使用c#+mysql,需要在一个窗体设置mysql自动删除功能,包括自动删除多少天之前的数据以及是否开启自动删除功能,我程序退出后,还怎么控制Mysql自己删除啊?是不是要用mysql的event来实现?c#可以调用mysq ......
DataSet导出xml 批处理(循环)得怎么处理
XML文件
<A>
<B>
<C>
</C>
&nb ......
css制作的弹出菜单,鼠标移出后菜单消失,我现在想让鼠标移出后菜单保留。就像伊利公司(www.yili.com)一样。
是不是要改菜单弹出的js或css代码。代码如下:就是不知如何改?
function menuFix()
{var sfEls = doc ......
如何向IE中的HTML文本框发送消息,写入字符?
就是能实现向IE中的页面发送鼠标键盘等消息,要如何实现?
写入字符只是把我的问题简单化而已,实际上当然不是这样。
IHTMLDocument2当然能实现写字符,但是要 ......
我的ajax的updatepanel控件里的面不能执行response.write,可是我需要弹出对话框,我要怎么做呢?
有没有不需要response.write弹提示框的做法呢?
另外我的页面上有一个web用户控件,然后放一个gridview在updatepa ......