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

C# substringÍêÃÀ½ØÈ¡HTML×Ö·û

×¢£º´Ëº¯ÊýÊÇÔÚÍøÉÏËÑË÷µÃÀ´£¬Òò´ËÎÞ·¨×¢Ã÷×÷ÕßÃû£¬Äª¹Öι֡£ºÙ¡£
 /// <summary>
/// °´×Ö½Ú³¤¶È½ØÈ¡×Ö·û´®(Ö§³Ö½ØÈ¡´øHTML´úÂëÑùʽµÄ×Ö·û´®)
/// </summary>
/// <param name="content">½«Òª½ØÈ¡µÄ×Ö·û´®²ÎÊý</param>
/// <param name="length">½ØÈ¡µÄ×Ö½Ú³¤¶È</param>
/// <param name="StripHTML">½ØÈ¡µÄ½á¹ûÊÇ·ñΪhtml´úÂë</param>
/// <returns>½ØÈ¡µÄ×Ö·û´®</returns>
public static string GetContentSummary(string content, int length, bool StripHTML)
{
if (string.IsNullOrEmpty(content) || length == 0)
return "";
if (StripHTML)
{
System.Text.RegularExpressions.Regex re = new System.Text.RegularExpressions.Regex("<[^>]*>");
content = re.Replace(content, "");
content = content.Replace("¡¡", "").Replace(" ", "").Replace(" ", "");
if (content.Length <= length)
return content;
else
return content.Substring(0, length) + "...";
}
else
{
if (content.Length <= length)
return content;
int pos = 0, npos = 0, size = 0;
bool firststop = false, notr = false, noli = false;
System.Text.StringBuilder sb = new System.Text.StringBuilder();
while (true)
{
if (pos >= content.Length)
break;
string cur = content.Substring(pos, 1);
if (cur == "<")
{
string next = content.Substring(pos + 1, 3).ToLower();
if (next.IndexOf("p") == 0 && next.IndexOf("pre") != 0)
{
npos = content.IndexOf(">", pos)


Ïà¹ØÎĵµ£º

C#ÓëFlash½»»¥

µÚÒ»²½C#Ìí¼Ó×é¼þ
´ò¿ªVS2005-¹¤¾ß-Ñ¡Ôñ¹¤¾ßÏäÏî-COM×é¼þ-Ñ¡ÔñShockwave Flash Object-È·¶¨
Ìí¼ÓºÃ×é¼þÍù³¡¾°ÉÏÍÏ·Å£¬Èç¹ûÌáʾע²áÐèÇó×¢²á
c# ×¢²á¿Ø¼þ-ÔÚÔËÐÐÊäÈë-»Ø³µ£¨flash9f.ocxÕâ¸öÎļþÒÔϵͳÖÐʵ¼ÊÎļþΪ׼¡££©
regsvr32 c:\windows\system32\macromed\flash\flash9f.ocx
»òÕßregsvr32 c:\windows\system32\ma ......

´«ÖDz¥¿ÍJavaÅàѵ HTML»ù´¡Ê¾Àý

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>ʵÀý1</TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME=" ......

htmlÍøÒ³µ½wmlºÍxhtmlµÄtranscoder

½üÆÚ¹¤×÷ÐèÒª£¬ÐèÒª×÷»¥ÁªÍøÍøÒ³µ½ÊÖ»úpdaµÈÒÆ¶¯Öն˵Ää¯ÀÀÆ÷transcoding´¦Àí¡£
¼Æ»®£º
transcoder
1,ÁоÙËùÓеÄtranscoderÒýÇæ£¬ºÍ²ÎÊý£¬¹Û²ìЧ¹û
google:
http://www.google.cn/gwt/x?wsc=tc&u=www.baidu.com
baidu:
http://gate.baidu.com/tc?m=5&src=www.aibang.com      £¨mÊ ......

htmlµÄһЩ±ê×¼cssÑùʽ

ÔÚhtmlÖУ¬¼´Ê¹ÎÒÃÇûÓÐÖ¸¶¨Ò³ÃæÔªËØÏÔʾµÄcssÑùʽ£¬ÔªËØÒ²»á°´ÕÕĬÈϵĵıê×¼cssÑùʽȥÏÔʾ¡£Òò´ËÕÆÎÕ»ù±¾µÄhtml±êÇ©¿ÉÒÔÔÚÒ»¶¨³Ì¶ÈÉϾ«¼òÄãµÄcss´úÂ룬ÏÖ½«html±êÇ©µÄĬÈÏÊôÐÔ½øÐÐÒ»¶¨µÄ»ã×ÜÈçÏ£º
li              { display: list-item } 
h ......

C#ÀûÓÃFluorinefxʵÏÖʹÓÃAMF3ЭÒéÓëFlashͨѶ

ͨ³££¬Ê¹ÓÃFlashÀ´µ÷ÓÃ.NET×é¼þÐèÓÃÔ¶³Ìµ÷Óã¬Êµ¼ÊÉÏÎÒÃÇÒ²¿ÉÒÔͨ¹ýSOCKETÖ±½ÓͨÐÅ¡£
¾ßÌå²ÉÓÃFlashµÄAMF3»òAFM0¸ñʽ£¬²ÉÓÃÁ÷ÐеÄFluorineFx·þÎñÆ÷×é¼þ£¬¾ßÌå´úÂëÈçÏ£º
ÒÀÕÕ´ËÓ÷¨¿ÉÒÔ¿ª·¢ÍøÒ³ÓÎÏ·»òÆäËüFlashÓ¦ÓõÄ.NET SOCKET·þÎñÆ÷¡£
using System;
using System.Collections.Generic;
using System.Collections.S ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ