Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

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


Ïà¹ØÎĵµ£º

ASP.NET 2.0 ¶þ¼¶ÓòÃûFormsÑé֤ģʽϹ²ÏíµÇ½״̬

ÔÚasp.net 1.1ÖÐ, ¶þ¼¶ÓòÃûFormsÑé֤ģʽϹ²ÏíµÇ½״̬µÄ·½·¨Çë²Î¿¼ÏÂÃæÎÄÕÂ:
http://www.cnblogs.com/caomao/archive/2005/07/05/186606.html
¶øÔÚasp.net 2.0ÖÐʵÏÖ·½·¨¸üΪ¼òµ¥£¬Ö»ÐèÐÞ¸Äweb.configÎļþ¼´¿É£¬Ð޸ķ½·¨ÈçÏÂ:
<authentication mode="Forms">
    <forms name ......

Asp.net ÖÐsession´æ´¢µÄÈýÖÖģʽµÄ¾ßÌåÔËÓÃ

ÔÚAsp.netÖÐSessionµÄ´æ´¢·½Ê½²»ÏóaspÄÇÑùµ¥Ò»£¬Ò»¹²ÌṩÁËÈýÖÖ´æ´¢·½Ê½£¬ÓÉÓÚ×î½üÒ»¸ö2000¶àÈËʹÓõÄwebÈí¼þ³öÏÖÁ˹ÊÕÏ£¬Óû§Ã¿
ÌìÔçÉÏÔÚijһʱ¿Ì³öÏÖÄÑÒԵǽÏÖÏ󣬽Ó×ÅSession¶ªÖµ³öÏÖ£¬Ö»ÓÐÖØÆôIIS,»ò»úÆ÷.Õâʱ³ÌÐò»Ö¸´Õý³£ÁË.ÕûÌ춼²»»á³öÏÖͬÑùµÄÎÊÌâ
£¬µ«ÊǵڶþÌìÒÀ¾É!ÕâÖÖÏÖÏó³ÖÐøÁ˺ü¸Ì죬ÎÒ¼ì²éÁËÒ»ÏÂÈÕÖ¾Îļþ ......

Ìá¸ßASP.NETÓ¦ÓóÌÐòÐÔÄܵļ¸Õз½·¨

ÒÔϾ­Ñé×ܽá×Ô£¬²¢ÇÒ¾­¹ýÑéÖ¤
1£¬²»²ÎÓëPOSTBACK»úÖƵĿؼþ£¬²»ÒªÓ÷þÎñÆ÷¿Ø¼þ£¬¾¡Á¿Óþ²Ì¬HTML±ê¼Ç
2£¬±àÒëʱʹÓÃRELEASEÅäÖÃ
3£¬ÕýʽͶÈëÓ¦ÓÃʱ£¬¼Ç׎«DEBUGÉèΪFALSE
4£¬SMARTNAVIGATE¼Ç×ÅÉèΪTRUE£¬Ëü¿ÉÒÔÈÃä¯ÀÀÕ߸оõµ½ÄãÐÔÄܵÄÌá¸ß
5£¬Èç¹û²»ÊDZØÐë±£³Ö¸üеÄÒ³Ã棬Çë¼Çס¼ÓÈëÉùÃ÷£¬Ëü¿ÉÒÔ´ó·ùÌá¸ßÐÔÄÜ
6£¬³ý ......

asp.net ¶ÔxmlÎļþµÄ¶Áд,Ìí¼Ó,ÐÞ¸Ä,ɾ³ý²Ù×÷

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Xml;
private XmlDo ......

asp.net»ñÈ¡´«ÖµgetºÍpostÇëÇó


//postÇëÇó
string name = Request["name"].toString();
string name   =Request.Form.Get("name").toString();
//getÇëÇó
string name = Request.QueryString["name"].toString();
µ«ÎÒ·¢ÏÖ ÎÞÂÛÊÇ·ñÊÇpostÓëget´«Öµ
¶¼¿ÉÓÃstring name = Request["name"].toString();
±íµ¥Ìá½»ÖÐgetºÍpost·½Ê½µ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ