asp.net responseдÎļþ
protected void Button2_Click(object sender, EventArgs e)
{
bool ok = true;
string fileName;
fileName = DateTime.Now.ToString("yyyyMMddHHmmss") + ".doc";
try
{
Response.ClearHeaders();
Response.ContentType = "application/msword;";
Response.Charset = "UTF-8";
Response.AddHeader("Content-Disposition", string.Format("attachment;filename=\"{0}\"", fileName));
Response.BinaryWrite(Encoding.Default.GetBytes(strr));
}
catch (Exception ex)
{
ok = false;
Response.Write("Éú³ÉÎļþʧ°Ü£º" + ex.Message + "£¬ÇëÉÔºóÔÙÊÔ¡£");
CreateGbpt(fileName, strr);
}
if (ok)
{
Response.End();
}
}
private void CreateFile(string fileName, string text)
{
bool ok = true;
string filePath;
&
Ïà¹ØÎĵµ£º
1.
±£Ö¤xp»·¾³ÒѾ°²×°ÓÐ.net framework 3.5 sp1¡¢asp.net mvc 1.0»ò2.0
2.
ÓÉÓÚiis5.1Ö»ÓÐÒ»¸öĬÈÏÍøÕ¾£¬Òò´ËÏȽ«Ä¬ÈÏÍøÕ¾µÄÆäËûÎļþ·Åµ½ÆäËûλÖ㬽«ÏîÄ¿Îļþ¿½±´µ½Ä¬ÈÏÍøÕ¾ËùÔÚĿ¼£¨Ò»°ãÊÇ£ºC:\Inetpub\wwwroot£©£¬ÐÞ¸ÄÏàÓ¦µÄÁ¬½Ó×Ö·û´®¡£
3. ......
1. ¼òÊö private¡¢ protected¡¢ public¡¢ internal ÐÞÊηûµÄ·ÃÎÊȨÏÞ¡£
´ð . private : ˽ÓгÉÔ±, ÔÚÀàµÄÄÚ²¿²Å¿ÉÒÔ·ÃÎÊ¡£
protected : ±£»¤³ÉÔ±£¬¸ÃÀàÄÚ²¿ºÍ¼Ì³ÐÀàÖпÉÒÔ·ÃÎÊ¡£
public : ¹«¹²³ÉÔ±£¬ÍêÈ«¹«¿ª£¬Ã»ÓзÃÎÊÏÞÖÆ¡£
internal: ÔÚͬһÃüÃû¿Õ¼äÄÚ¿ÉÒÔ·ÃÎÊ¡£
2 .ÁоÙASP.NET Ò³ÃæÖ®¼ä´«µÝÖµµÄ¼¸ÖÖ·½Ê½¡£
´ ......
ASP.NETÒ³ÃæÓëIISµ×²ã½»»¥ºÍ¹¤×÷ÔÀíÏê½â
µÚÒ»»Ø£º
ÒýÑÔ
ÎÒ²éÔĹý²»ÉÙAsp.NetµÄÊé¼®£¬·¢ÏÖ´ó¶àÊý×÷Õß¶¼ÊÇÕ¾ÔÚÒ»¸ö±È½Ï¸ßµÄ²ã´ÎÉϽ²½âAsp.Net¡£ËûÃÇÄÍÐÄ¡¢Ï¸ÖµظæËßÄãÈçºÎÒ»²½²½ÍϷſؼþ¡¢ÉèÖÿؼþÊôÐÔ¡¢±àдCodeBehind´úÂ룬ÒÔʵÏÖij¸öÌØ¶¨µÄ¹¦ÄÜ¡£
ÕâÖÖ×ö·¨£¬Êµ¼ÊÉÏÊǻشðÁË“ÈçºÎÈ¥×ö”µÄÎÊÌ⣬ȴà ......
---------------------------------------
Asp.Net,C#,SQL,JS,WCF,AJAX,¹¤×÷Á÷,WPF,MVC,LINQ,Éè¼ÆÄ£Ê½(¼Ü¹¹)µÈ¼¼ÊõÌÖÂÛ
“ASP.NET(C#)Fans” QQȺ£º96877690
---------------------------------------
²»¹ÜÊÇJ2SE¡¢J2EE»¹ÊÇJ2ME¾´Çë¼ÓÈ룡Eclipse¡¢NetBeans
Java½»Á÷QQ¸ß¼¶ÈºÀ©ÕУº96878255 ......
½ñÌìÔÚ·þÎñÆ÷×°ºÃ .net Framework 3.5ºó£¬ÔËÐÐASP.NET ³öÏÖ³ÌÐò´íÎ󣬵«ÊÇÓÖûÓгöÏÖÌØ¶¨³ÌÐò´íÎó£¬Ëµ½Ð²é¿´ÈÕ¼ÇÎļþ£¬Ò»¿´£¬ËµÊ²Ã´ ³ÌÐòÓòÓÐÎÊÌ⣬°Ù¶ÈÖ®ºó£¬ºÜ¹ÜÓ㺠ӦÓóÌÐò³Ø -- ÊôÐÔ -- ±êʶ -- ¸Ä³É ±¾µØÏµÍ³ ÎÊÌâ½â¾ö¡£Ìش˼Ǽ¡£ ......