截取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);", "&
相关问答:
txt 和XML 格式相应
不借助DataSet
导入读取TXT文件
然后直接写入XML(同一文件,不同数据,递增原数据没有被覆盖情况下增加数据.)
教个要点或最好是有个代码提示的
过路好汉 帮个忙撒^^
不会,帮楼主 ......
我用js在html中添加空间的方式可以在ff下的html文件中输出mathml公式,代码如下:
=================================
<head>
<script type="text/javascript">
var myns = &qu ......
我在form1中的某个方法让form2窗体出现
那么这个时候怎么关闭form1而不关闭form2呢?
Form2 f=new Form2();
f.Show();
this.Close();
引用
Form2 f=new Form2();
f.Show();
this.Close();
这样的话整个程 ......
我的ajax的updatepanel控件里的面不能执行response.write,可是我需要弹出对话框,我要怎么做呢?
有没有不需要response.write弹提示框的做法呢?
另外我的页面上有一个web用户控件,然后放一个gridview在updatepa ......