代码下载:http://download.csdn.net/source/2508693
html过滤:
Encode Decode
不编码:
编码:
过滤危险字符:
载取字符:
代码
using System;
using Lazy.security;
public partial class LazySecurity : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
TextBox2.Text = lazyText.FilterHtml(TextBox1.Text);
}
protected void Button2_Click(object sender, EventArgs e)
{
Label1.Text = TextBox3.Text;
}
protected void Button3_Click(object sender, EventArgs e)
{
// string str=lazyText.Encode(TextBox3.Text);
Label1.Text = lazyText.Encode(TextBox3.Text);
}
protected void Button4_Click(object sender, EventArgs e)
{
Label2.Text = lazyText.ReplaceDangerString(TextBox4.Text);
}
protected void Button5_Click(object sender, EventArgs e)
{
Label3.Text = lazyText.CatStr(TextBox5.Text,20);
}
}