´ÓÊý¾Ý¿âÖÐȡֵÅúÁ¿Éú³ÉhtmlÎļþ
1. web.config
<connectionStrings>
<add name ="myconn" connectionString="Data Source=who\SQLEXPRESS; Initial Catalog=dbname;Integrated Security=True;" providerName="System.Data.SqlClient"/>
</connectionStrings>
2.
string htmlPath = "D:\\htmlFiles";
string[] files = Directory.GetFiles(htmlPath,"*.html");
foreach (string filename in files)
{
File.Delete(filename);
}
3.
string conn = ConfigurationManager.ConnectionStrings["myconn"].ToString();
SqlConnection sqlconn = new SqlConnection(conn);
SqlCommand scom = new SqlCommand("select * from table",sqlconn);
SqlDataAdapter sda = new SqlDataAdapter(scom);
DataSet ds = new DataSet();
sda.Fill(ds);
if (ds.Tables[0].Rows.Count > 0)
{
writeHtml(ds);
}
4.
foreach (DataRowView drv in dv)
{
int pid = int.Parse(drv["pid"].ToString().Trim());
string id_name = drv["ID_Name"].ToString().Trim();
string en_title = drv["en_title"].ToString().Trim();
string en_contents = drv["en_contents"].ToString();
string htmlName = String.Format("{0:D4}{1}.html",pid,id_name);
htmlName = htmlName.Replace(' ','_');
htmlName = htmlName.Replace('/','_');
htmlName = htmlName.Replace(':','_');
string htmlContents = "<html><head><title>" + en_title + "</title><meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\"><LINK href="\" mce_href="\""css.css\" type=\"text/css\" rel=\"stylesheet\"></head><body><table><tbody><tr valign=\"top\"><td valign=\"top\" height=\"467\" width=\"696\">" + en_contents + "</td></tr></tbody></
Ïà¹ØÎĵµ£º
´óÔ¼3Äêǰ£¬Î¢ÈíÍÆ³ö Silverlight 1.0£¬ÄÇʱ£¬Adobe Я Flash Óµ±ø×ÔÖØ£¬¾¡¹Ü΢Èí¶Ô Silverlight
µÄÍÆ¹ãÁ¦¶È·Ç³£Ç¿£¬È´²¢Ã»Óк³¶¯ Adobe µÄ°ÔÖ÷µØÎ»£¬»òÐíÊг¡Îª¶þÕß¶¼±£ÁôÁ˿ռ䣬Èç½ñ HTML5
·çÉùº×ণ¬informationweek.com ÕÙ¼¯Î¢ÈíºÍ Adobe ¾Í Flash£¬Silverlight ºÍ HTML5 ×öÁËÒ»·¬±çÂÛ¡£
ÒÔÏÂÊDZçÂÛÈüµÄ¼Òô£¬ÏÖ³ ......
¿çÐкϲ¢£ºrowspan, ¿çÁкϲ¢£º colspan.
<table border=2 width="50%">
<tr>
<td rowspan=2> Ì쳯 </td>
<td> Party </td>
</tr>
<tr><td>ºÓз</td></tr>
</table>
<table border=2 width="50%">
<tr&g ......
Meta±êÇ©Ïê½â£¬ÔÚÍøÉÏתµÄ£¬Ï£Íû¶Ô´ó¼ÒÓÐÓÃ
¡¡¡¡ÒýÑÔ
¡¡¡¡ÄúµÄ¸öÈËÍøÕ¾¼´Ê¹×öµÃÔÙ¾«²Ê£¬ÔÚ“ºÆå«È纣”µÄÍøÂç¿Õ¼äÖУ¬Ò²ÈçÒ»Ò¶±âÖÛ²»Ò×ΪÈË·¢ÏÖ£¬ÈçºÎÍÆ¹ã
¸öÈËÍøÕ¾£¬ÈËÃÇÊ×ÏÈÏëµ½µÄ·½·¨ÎÞÍâºõÒÔϼ¸ÖÖ£º
¡¡¡¡¡ñ¡¡ÔÚËÑË÷ÒýÇæÖеǼ×Ô¼ºµÄ¸öÈËÍøÕ¾
¡¡¡¡¡ñ¡¡ÔÚÖªÃûÍøÕ¾¼ÓÈëÄã¸öÈËÍøÕ¾µÄÁ´½Ó
¡¡¡¡¡ñ¡¡ÔÚÂÛ̳ ......
£¼html£¾
£¼head£¾
£¼title£¾±êÌ⣼title£¾
£¼/head£¾
£¼body£¾..........ÎļþÄÚÈÝ..........
£¼/body£¾
£¼/html£¾
1.Îļþ±êÌâ
£¼title£¾..........£¼/title£¾
2.Îļþ¸üÐÂ--£¼meta£¾
¡¾1¡¿10Ãëºó×Ô¶¯¸üÐÂÒ»´Î
£¼meta http-equiv="refresh" content=10£¾
¡¾2¡¿10Ãëºó×Ô¶¯Á¬½áµ½ÁíÒ»Îļþ
£¼meta http-equiv="ref ......
metaÊÇÓÃÀ´ÔÚHTMLÎĵµÖÐÄ£ÄâHTTPÐÒéµÄÏìӦͷ±¨ÎÄ¡£meta
±êÇ©ÓÃÓÚÍøÒ³µÄ<head>Óë</head>ÖУ¬meta ±êÇ©µÄÓô¦ºÜ¶à¡£meta
µÄÊôÐÔÓÐÁ½ÖÖ£ºnameºÍhttp-equiv¡£nameÊôÐÔÖ÷ÒªÓÃÓÚÃèÊöÍøÒ³£¬¶ÔÓ¦ÓÚcontent£¨ÍøÒ³ÄÚÈÝ£©£¬ÒÔ±ãÓÚËÑË÷ÒýÇæ»úÆ÷È˲éÕÒ¡¢·ÖÀࣨĿ
ǰ¼¸ºõËùÓеÄËÑË÷ÒýÇæ¶¼Ê¹ÓÃÍøÉÏ»úÆ÷ÈË×Ô¶¯²éÕ ......