asp.netʵÏÖÎļþÏÂÔØ(wapÊÖ»úÏÂÔØ)
Õâ¸öÎÊÌâÀ§ÈÅÁËÎÒÁ½Ì죬ÊÖ»úÏÂÔØ
protected void Page_Load(object sender, EventArgs e)
{
string filename = Server.UrlDecode(Request["upload"]);
string filePath = Server.MapPath("upload/" + filename);//·¾¶
FileDownload(filePath);
}
/// <summary>
/// ÎļþÏÂÔØ
/// </summary>
/// <param name="FullFileName"> </param>
private void FileDownload(string FullFileName)
{
try
{
FileInfo DownloadFile = new FileInfo(FullFileName);
if (DownloadFile.Exists)
{
Response.Clear();
Response.ClearHeaders();
Response.Buffer = false;
//Response.ContentType = "application/octet-stream";//֪ͨä¯ÀÀÆ÷ÏÂÔØÎļþ¶ø²»ÊÇ´ò¿ª
Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(DownloadFile.FullName, System.Text.Encoding.UTF8));
Response.AppendHeader("Content-Length", DownloadFile.Length.ToString());
&nb
Ïà¹ØÎĵµ£º
ÔÚWeb±à³Ì¹ý³ÌÖУ¬´æÔÚןܶలȫÒþ»¼¡£±ÈÈçÔÚÒÔǰµÄASP°æ±¾ÖУ¬CookieΪ·ÃÎÊÕߺͱà³ÌÕß¶¼ÌṩÁË·½±ã£¬²¢Ã»ÓÐÌṩ¼ÓÃܵŦÄÜ¡£´ò¿ªIEä¯ÀÀÆ÷£¬Ñ¡Ôñ“¹¤¾ß”²Ëµ¥ÀïµÄ“InternetÑ¡Ï¬È»ºóÔÚµ¯³öµÄ¶Ô»°¿òÀïµ¥»÷“ÉèÖÔ°´Å¥£¬Ñ¡Ôñ“²é¿´Îļþ”°´Å¥£¬ÔÚµ¯³öµÄ´°¿ÚÖУ¬¾Í»áÏÔʾӲÅÌÀï ......
ÔÚ·þÎñÆ÷¶Ë£¬´¦ÀíÒ»¸öASP.NET Web FormÐèÒª¼¸¸ö²½Ö裬ÔÚÿ¸ö²½Öè¶¼»áÒý·¢¸÷ÖÖʼþ£¬Õâ¾ÍÔÊÐíÄã°ÑÍøÒ³²åÈëµ½ÈÎÒ»²½ÖèµÄ´¦ÀíÁ÷Öв¢ÇÒÏìÓ¦ÈκÎÄãËùÆÚÍûµÄ´¦Àí¡£
ÒÔÏÂÊÇASP.NETÍøÒ³´¦ÀíÁ÷ÖеöÖ÷Òª²½Öè
1.ÍøÒ³¿ò¼Ü³õʼ»¯
2.Óû§´úÂë³õʼ»¯
......
1.Init£¨³õʼ»¯½×¶Î£©
2.LoadViewState£¨ÔØÈëÊÓͼ״̬£©
3.LoadPostData£¨´¦Àí»Ø·¢Êý¾Ý£©
public virtual bool LoadPostData(string postDataKey, NameValueCollection postCollection)
ÅжÏÊÓÍ ......
ÖÚËùÖÜÖª£¬WEBÉϵĴòÓ¡ÊDZȽÏÀ§Äѵ쬳£¼ûµÄWEBÉÏ´òÓ¡µÄ·½·¨´ó¸ÅÓÐÈýÖÖ£º
¡¡¡¡1¡¢Ö±½ÓÀûÓÃIEµÄ´òÓ¡¹¦ÄÜ¡£Ò»°ãÀ´Ëµ£¬ÕâÖÖ·½·¨¿ÉÒÔ×öЩÀ©Õ¹£¬¶ø²»Êǵ¥µ¥µÄµ÷ÓÃjavascript:print()ÕâÑù¼òµ¥£¬±ÈÈ磬¿ÉÒÔʹÓÃÈçÏ´úÂ룺
£¼OBJECT
id=WebBrowser classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 width=0£¾
£¼/ ......
ÔÚ×¢²á±í System->CurrentControlSet->Services->Eventlog ´¦Ñ¡ÔñÌí¼ÓϵͳÖÐ AspNet Õâ¸öÕË»§×¢ÒâÊÇÔÚÓÒ¼üµÄ °²È«->ȨÏÞ->Ìí¼Ó
дÈÕÖ¾
public static void Log(string sourceName, string message)
{
EventLog eventLog = null;
......