asp.net Éú³É¾²Ì¬Ò³Ãæ
ºǫ́£º
string strDate = DateTime.Now.ToString("yyMMdd") + "\\" + DateTime.Now.ToString("yyyyMMddHHmmss");
string strFileName = strDate + ".html";
string strTitle = this.Txt_C_Name.Text.Trim();
string strContent = this.Content.Value.Trim();
string[] content = strContent.Split(new Char[] { '^' });//¶ÔÄÚÈݽøÐвð·Ö£¬²¢±£´æµ½Êý×顾^¡¿
int upbound = content.Length;//Êý×éµÄÉÏÏÞ
//SqlServerDataBase db = new SqlServerDataBase();
//bool success = db.Insert("insert into inNews(Title,Content,FilePath)values('" + strTitle + "','" + strContent + "','" + strFileName + "')", null);
//if (success)
// Message.Text = "Ìí¼Ó³É¹¦£¡";
/**/
///////////////////////////´´½¨µ±Ç°ÈÕÆÚµÄÎļþ¼Ð¿ªÊ¼
string dir = Server.MapPath("../Files/" + DateTime.Now.ToString("yyMMdd"));//ÓÃÀ´Éú³ÉÎļþ¼Ð
if (!Directory.Exists(dir))
{
Directory.CreateDirectory(dir);
}
/**/
///////////////////////////´´½¨µ±Ç°ÈÕÆÚµÄÎļþ¼Ð½áÊø
try
{
for (int i = 0; i < content.Length; i++)
{
//string[] newContent = new string[4];//¶¨ÒåºÍhtml±ê¼ÇÊýÄ¿Ò»ÖµÄÊý×é
StringBuilder strhtml = new StringBuilder();
//´´½¨StreamReader¶ÔÏó
using (StreamReader sr = new StreamReader(Server.MapPath("Template/") + "\\template.html", Encoding.GetEncoding("gb2312")))
{
String oneline;
//¶ÁÈ¡Ö¸¶¨µÄHTMLÎļþÄ£°å
while ((oneline = sr.ReadLine()) != null)
{
strhtml.Append(oneline);
}
sr.Close();
}
//Ϊ±ê¼ÇÊý×鸳ֵ
//SqlServerDataBase db = new SqlServerDataBase();
//DataSet ds = db.Select("select top 1 NewsId from inNews order by NewsId desc"
Ïà¹ØÎĵµ£º
asp.netµÄ´íÎó--Failed to access IIS metabase ÊÕ²Ø
Server Error in '/sdxx' Application.
--------------------------------------------------------------------------------
Failed to access IIS metabase.
Description: An unhandled exception occurred during the execution of the current web ......
×öÏîÄ¿Ò²ÓÐÒ»¶Îʱ¼äÁË£¬ÔÚ³ÌÐòÖÐÒ²Óöµ½ºÜ¶à°²È«·½ÃæµÄÎÊÌâ¡£Ò²¸Ã×ܽáÒ»ÏÂÁË¡£Õâ¸öÏîÄ¿ÊÇÒ»¸ö CMS ϵͳ¡£ÏµÍ³ÊÇÓà ASP.NET ×öµÄ¡£¿ª·¢µÄʱºò·¢ÏÖ΢Èí×öÁ˺ܶలȫ´ëÊ©£¬Ö»ÊÇÓÐЩÐÂÊÖ³ÌÐòÔ±²»ÖªµÀÔõô¿ªÆô¡£ÏÂÃæÎÒͨ¹ý¼¸¸ö·½Ãæ¼òµ¥½éÉÜ£º
¡¡¡¡1£ºSQL ×¢Èë
¡¡¡¡2£ºXSS
¡¡¡¡3£ºCSRF
¡¡¡¡4£ºÎļþÉÏ´«
SQL ×¢Èë
¡¡¡¡ÒýÆðÔÒ ......
asp.netÖеÄÓû§¿Ø¼þÎÞÒÉÊÇ´úÂëÖØÓõÄÁ¼ºÃ;¾¶£¬²»µ«µ÷Ó÷½±ã£¬Éè¼ÆÆðÀ´Ò²·Ç³£Ö±¹Û£¬±¾Éí¾Í¼¸ºõ¿ÉÒÔ×öΪÆÕͨҳÀ´¶Ô´ý¡£
ÔÚµ÷ÓÃÒ³ÖУ¬ÈçºÎ¿ØÖÆÓû§¿ØÖÆÖеĿؼþÄØ£¿ÎÒÏëasp.netµÄÉè¼ÆÕߣ¬ÔÚÉè¼ÆÖ®³õ£¬Ôç¾ÍÒѾ¿¼Âǵ½ÁËÕâÒ»µãÁË°É£¡¼ÈÈ»Óû§¿ØÖÆÔÚµ÷ÓÃÒ³ÃæÖÐÓÐΨһµÄID±êʶ£¬ÄÇôÆäÏà¹ØµÄ²Ù×÷£¬¿Ï¶¨Ò²ÊÇͨ¹ýÕâ¸öid±êʶÀ´ÊµÏÖ ......
×î½üÔÚºÍÒ»¸öͬѧ±àдһ¸ö¹ÜÀíϵͳµÄʱºò£¬ÒªÓõ½GridView¿Ø¼þ£¬½á¹ûÔÚCSDNÀïÃæÕÒµ½Ò»¸ö²©¿Í£¬ÕâЩ½²µÃºÜÏêϸ£¬Ìṩһ¸öµØÖ·¸ø´ó¼Ò²Î¿¼°É
http://blog.csdn.net/21aspnet/archive/2007/03/25/1540301.aspx
»¹ÓÐÒ»¸ö¾ÍÊǰٶȿռäÀïÃæµÄ:http://hi.baidu.com/%BA%AB%C7%EC%D5%EA/blog/item/c0b717daa312fb3f33fa1c91.html ......
ASP.NetʵÏÖ½«Wordת»»PDF¸ñʽ
×÷ÕߣºØýÃû À´Ô´£º¶¯Ì¬ÍøÕ¾ÖÆ×÷Ö¸ÄÏ Ê±¼ä£º2006-3-28
¡¡Ç°ÑÔ:ÓÉÓÚÒ»¸ö¿Í»§µÄÏîÄ¿ÖÐÐèÒª½«WORDÎĵµ×ª»»³ÉPDF¸ñʽ,¹ÊдÁ˱¾ÆªÊµÕ¾½Ì³Ì
¡¡¡¡ÐèÇó·ÖÎö:¿Í»§µÄÏîÄ¿ÒÔB/S½á¹¹ÎªÖ÷,Ìṩһ¸öWORDÎļþÔÚºǫ́×Ô¶¯×ª»»³ÉPDF,¾¹ýʵ¼Ê²âÊÔ,Èç¹û¸ÃƪWORDÎĵµÓÐ100¶àÒ³µÄ»°,ת» ......