´ÓÊý¾Ý¿âÖÐȡֵÅúÁ¿Éú³É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></
Ïà¹ØÎĵµ£º
±ÈÈç˵ÏÖÔÚÓÐÁ½¸öºÁÎÞ¹ØÏµµÄhtmlÒ³Ãæ£ºa.html;b.html
´Óa.htmlÌøµ½b.htmlʱÈçºÎÔÚb.htmlÒ³ÃæÖлñµÃa.html´«¹ýÀ´µÄÊý¾ÝÄØ£¿
´úÂëÈçÏ£º
ÔÚa.htmlÖÐÓÐÒ»¸öÁ¬½ÓÖ¸Ïòb.html,<a href="b.html?name='wangzheguilai'">תµ½b</a>
ÔÚb.htmlÖоͿÉÒÔͨ¹ýjsÕâÑù»ñµÃnameµÄÖµ<script>var name=window.location.se ......
¡¡¡¡
¡¡¡¡»ù±¾²½Öè
¡¡¡¡1£¬°ÑÐèÒªÅÅÐòµÄÐзŵ½tbodyÖУ¨³ÌÐò»áÖ±½ÓÈ¡tbodyµÄrows£©£»
¡¡¡¡2£¬°ÑÅÅÐòÐзŵ½Ò»¸öÊý×éÖУ»
¡¡¡¡this.Rows = Map(this.tBody.rows, function(o){ return o; });
¡¡¡¡3£¬°´ÐèÇó¶ÔÊý×é½øÐÐÅÅÐò£¨ÓÃÊý×éµÄsort·½·¨£©£»
¡¡¡¡this.Rows.sort(Bind(this, this.Compare, orders, 0));
¡¡¡¡4£¬ ......
IISÅäÖÃ.htmlµÄÓ³ÉäÎÊÌ⣬ÆäʵÕâ¸öÎÊÌâ¿ÉÒÔ˵ÊÇHttpHandlerFactoryµÄÔÚweb.configÖÐ×¢²áµÄÎÊÌâ
ÎÊÌâÃèÊö£º
Ò»Ì×ÍøÕ¾³ÌÐòʹÓÃURLÖØÐ´£¬ÅäÖÃÁËISAPIÓ³Éä.html ¶¯×÷È«²¿£¬¼ì²éÎļþÊÇ·ñ´æÔÚ ²»´ò¹´ ÈçÏÂͼ
ÎÊÌ⣺ ²»¶ÔIISÅäÖÃ.htmlµÄÓ³É䣬IISÕ¾µãĿ¼ÏÂ.htmlÒ³Ãæ¶¼ÄÜÏÔʾ¡£µ±ÅäÖÃÁË.htmlµÄÓ³Éä ......
£¼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 ......
<input type="text" value="" maxlength="18"
name="goods.goodsName" value="${goods.goodsName}"
style="width: 99%;" id="goodsName">
value ÊôÐÔ ÖØ¸´ £¬ µ¼Ö嵀 input Ç°Ì¨Ò³Ãæ Öµ Ϊ ""
ÒÔµÚÒ»¸öÊôÐÔµÄÖµÎª× ......