Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ASP.NET ÕýÔò±í´ïʽÇå³ýHTML´úÂë

public string ClearHtml(string HtmlStr)
{
string tmpStr = HtmlStr;
tmpStr = ReplaceHtml("&#[^>]*;", tmpStr, "");
tmpStr = ReplaceHtml("</?marquee[^>]*>", tmpStr, "");
tmpStr = ReplaceHtml("</?object[^>]*>", tmpStr, "");
tmpStr = ReplaceHtml("</?param[^>]*>", tmpStr, "");
tmpStr = ReplaceHtml("</?embed[^>]*>", tmpStr, "");
tmpStr = ReplaceHtml("</?table[^>]*>", tmpStr, "");
tmpStr = ReplaceHtml(" ", tmpStr, "");
tmpStr = ReplaceHtml("</?tr[^>]*>", tmpStr, "");
tmpStr = ReplaceHtml("</?th[^>]*>", tmpStr, "");
tmpStr = ReplaceHtml("</?p[^>]*>", tmpStr, "");
tmpStr = ReplaceHtml("</?a[^>]*>", tmpStr, "");
tmpStr = ReplaceHtml("</?img[^>]*>", tmpStr, "");
tmpStr = ReplaceHtml("</?tbody[^>]*>", tmpStr, "");
tmpStr = ReplaceHtml("</?li[^>]*>", tmpStr, "");
tmpStr = ReplaceHtml("</?span[^>]*>", tmpStr, "");
tmpStr = ReplaceHtml("</?div[^>]*>", tmpStr, "");
tmpStr = ReplaceHtml("</?th[^>]*>", tmpStr, "");
tmpStr = ReplaceHtml("</?td[^>]*>", tmpStr, "");
tmpStr = ReplaceHtml("</?script[^>]*>", tmpStr, "");
tmpStr = ReplaceHtml("(javascript|jscript|vbscript|vbs):", tmpStr, "");
tmpStr = ReplaceHtml("on(mouse|exit|error|click|key)", tmpStr, "");
tmpStr = ReplaceHtml("<\\?xml[^>]*>", tmpStr, "");
tmpStr = ReplaceHtml("<\\/?[a-z]+:[^>]*>", tmpStr, "");
tmpStr = ReplaceHtml("</?font[^>]*>", tmpStr, "");
tmpStr = ReplaceHtml("</?b[^>]*>", tmpStr, "");
tmpStr = ReplaceHtml("</?u[^>]*>", tmpStr, "");
tmpStr = ReplaceHtml("</?i[^>]*>", tmpStr, "");
tmpStr = ReplaceHtml("</?strong[^>]*>", tmpStr, "");


Ïà¹ØÎĵµ£º

ASP.NET WEB.CONFIG

Ò»¡¢ÈÏʶWeb.configÎļþ
Web.config ÎļþÊÇÒ»¸öXMLÎı¾Îļþ£¬ËüÓÃÀ´´¢´æ ASP.NET Web Ó¦ÓóÌÐòµÄÅäÖÃÐÅÏ¢£¨Èç×î³£ÓõÄÉèÖÃASP.NET Web Ó¦ÓóÌÐòµÄÉí·ÝÑéÖ¤·½Ê½£©£¬Ëü¿ÉÒÔ³öÏÖÔÚÓ¦ÓóÌÐòµÄÿһ¸öĿ¼ÖС£µ±Äãͨ¹ý.NETн¨Ò»¸öWebÓ¦ÓóÌÐòºó£¬Ä¬ÈÏÇé¿öÏ»áÔÚ¸ùĿ¼×Ô¶¯´´½¨Ò»¸öĬÈϵÄWeb.configÎļþ£¬°üÀ¨Ä¬ÈϵÄÅäÖÃÉèÖã ......

Asp.netÉú³É¾²Ì¬Ò³ÃæÔ­Àí

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
usin ......

ASP.NETʵÏÖ¾Ö²¿Ë¢ÐÂGridView

 <% @ Page Language = " C# "  %>
<! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
< script runat ="server" >  
  System.Data.DataView Crea ......

asp.net ÍøÕ¾ÐÔÄÜÓÅ»¯

1. Êý¾Ý¿â·ÃÎÊÐÔÄÜÓÅ»¯
¡¡¡¡Êý¾Ý¿âµÄÁ¬½ÓºÍ¹Ø±Õ
¡¡¡¡·ÃÎÊÊý¾Ý¿â×ÊÔ´ÐèÒª´´½¨Á¬½Ó¡¢´ò¿ªÁ¬½ÓºÍ¹Ø±ÕÁ¬½Ó¼¸¸ö²Ù×÷¡£ÕâЩ¹ý³ÌÐèÒª¶à´ÎÓëÊý¾Ý¿â½»»»ÐÅÏ¢ÒÔͨ¹ýÉí·ÝÑéÖ¤£¬±È½ÏºÄ·Ñ·þÎñÆ÷×ÊÔ´¡£ASP.NETÖÐÌṩÁËÁ¬½Ó³Ø(Connection Pool)¸ÄÉÆ´ò¿ªºÍ¹Ø±ÕÊý¾Ý¿â¶ÔÐÔÄܵÄÓ°Ï졣ϵͳ½«Óû§µÄÊý¾Ý¿âÁ¬½Ó·ÅÔÚÁ¬½Ó³ØÖУ¬ÐèҪʱȡ³ö£¬¹Ø±Õ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ