Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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 +ACCESS µÇ¼

Ê×Ò³£º
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head ......

asp.netÁ´½ÓAccessÊý¾Ý¿â×Ö·û´®ÕýÈ··½·¨

ÔÚweb  configÖР ×÷ÈçÏÂÅäÖãº
<connectionStrings>
    <add name="ydycon" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;
Data Source=|DataDirectory|ydy.mdb" providerName="System.Data.OleDb"/>
 
  </connectionStrings>
ÔÚ.netÎļþÖÐÓ¦ÓÃÁ´½Ó ......

ASP.NET WEB.CONFIG

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

asp.netºÍajax䲶»ñÒì³£´¦Àí»úÖÆ

asp.netºÍajax䲶»ñÒì³£´¦Àí»úÖÆ
    ÕâÀïµÄÒì³£´¦ÀíÖ÷ÒªÊÇÖ¸¿ª·¢ÈËÔ±ÔÚÒµÎñ´úÂëÖÐ䲶»ñµÄÒì³£¡£Î´²¶»ñÒì³£´¦ÀíµÄÄ¿µÄ£º
    1£ºÔÚÓ¦ÓóÌÐòÓò¼¶±ð¶ÔÒì³£ÀàÐͽøÐд¦Àí£»
    2£ºÔÚ´¦ÀíµÄ»ù´¡ÉÏ£¬¿ÉÒÔ½«´íÎóÐÅÏ¢¼Ç¼ÈÕÖ¾£»
    3£ºÒÔÓѺõķ½Ê½Ìáʾ×îÖÕÓà ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ