ASP.NETÈ¥µôHTML±ê¼Ç
using System;
using System.Web;
using System.Text.RegularExpressions;
public static string NoHTML(string Htmlstring)
{
//ɾ³ý½Å±¾
Htmlstring = Regex.Replace(Htmlstring,@"<script[^>]*?>.*?</script>","",RegexOptions.IgnoreCase);
//ɾ³ýHTML
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);","&",RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring,@"&(lt|#60);","<",RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring,@"&(gt|#62);",">",RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring,@"&(nbsp|#160);"," ",RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring,@"&(iexcl|#161);","\xa1",RegexOptions.IgnoreCase);
Htmlstring = Regex.Replace(Htmlstring,@"&(cent|#162);","\xa2",RegexOptions.IgnoreCase);
Htmlstring = &nbs
Ïà¹ØÎĵµ£º
ASP.NET 2.0 ÖÐÐÂÔö¼ÓÁË Theme µÄ¹¦ÄÜ£¬ËüµÄ³öÏÖÄÜÈÃÍøվʵÏÖ»»·ô¸ü¼ÓÈÝÒס£
Theme µÄʵÏÖ°üÀ¨£ºCSS¡¢Skin¡¢MasterPage¡£
CSS ÊÇÓÃÓÚ¿ØÖÆËùÓÐ HTML ±ê¼ÇµÄÍâ¹Û¡£
Skin ÊÇÓÃÓÚ¿ØÖÆËùÓÐ ASP.NET ·þÎñÆ÷µ÷ÕûµÄÍâ¹Û£¬²¢ÇÒ¿ÉÒÔͨ¹ýÊôÐÔ cssClass ¶¨ÒåËüµÄ CSS Ñùʽ¡£
MasterPage ÊÇ *.aspx Ò³ÃæÄ£°æ£¬²»¹ýËüûÓỶ¨Òåµ½ The ......
µÚÒ»ÖÖÊÇÔÚapsxÒ³ÃæÉÏ·ÅÒ»¸öLable¿Ø¼þ
ÕâÖÖ·½Ê½¿ÉÒÔдJavascriptµÈ¿ØÖÆÒ³Ã棬ºÍ²¼¾ÖÒ³Ãæ
ÈçÏ£ºHTMLÒ³Ãæ´úÂ룺
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<TITLE>¶àýÌå²¥·ÅÒ³Ãæ</TITLE>
<meta content=" ......
///<summary>
///<author>·ÉÓ¥@ASPCool.com</author>
///<description>±¾ÎÄÓÃasp.netʵÏÖ°Ñ´ËÎÄÍƼö¸øºÃÓѵŦÄÜ¡£</desciption>
///<copyright>ASP¿á¼¼Êõ×ÊѶÍø(www.ASPCool.com)</copyright>
///</summary ......
×î½ü¼¸ÖÜ£¬ÔÚ²©¿Í¡¢TwitterºÍÂÛ̳ÉÏÈç»ðÈçݱµØÕ¹¿ªÁËÒ»³¡ÌÖÂÛ¡£ÌÖÂÛµÄÄÚÈÝÊÇ£º¿ª·¢ÈËÔ±ÊÇ·ñÓ¦¸ÃʹÓûòѧϰASP.NET MVC¡£´Ó“²»ÍƼöѧϰ”µ½“ËùÓÐASP.NET¿ª·¢ÈËÔ±¶¼Ó¦¸Ãѧϰ”£¬¸÷ÖÖ²»Í¬µÄ¹Ûµã²ã³ö²»Çî¡£InfoQ¶ÔÆäÖв¿·ÖÌÖÂÛÄÚÈݽøÐÐÁË×ܽᡣ
Rob Conerey£¨SubSonicÖ®¸¸£¬Ä¿Ç°ÊÇ΢ÈíASP.NET MVCÍÅ¶ÓµÄ ......
ÈÎÖ°×ʸñ:
1. ´óѧ±¾¿ÆÒÔÉÏѧÀú£¬ÈýÄêÒÔÉÏÈí¼þ¿ª·¢¹¤×÷¾Ñé»ò»¥ÁªÍø¿ª·¢¾Ñ飻¾ßÓжþ¸ö¼°ÒÔÉÏÖÐÐÍÏîÄ¿µÄ³É¹¦ÊµÊ©¾Ñ飻
2. ÓÐ׼ȷÀí½âÐèÇ󡢼ܹ¹ÄÜÁ¦£¬ÓнÏÇ¿µÄ³ÌÐòÉè¼ÆÄÜÁ¦, ÊìϤÃæÏò¶ÔÏó·ÖÎö¡¢Èí¼þ¹¤³Ì¡¢UMLµÈÏà¹Ø¼¼Êõ£»
3. ÊìÁ·ÕÆÎÕ¼ÆËã»ú±à³ÌÒ»°ã˼ÏëºÍ·½·¨£»ÊìϤһÖÁÁ½ÖÖÃæÏò¶ÔÏó±à³ÌÓïÑÔ£»¾«Í¨.NET¡¢ C#¡¢ASP.net¡ ......