Filter:   InfoImg
download Downloading.aspx.cs
Language: C#
LOC: 30
Project Info
common-component-mng-sys - Common Componen...e ...(common-component-mng-sys)
Server: Google
Type: svn
...on‑component‑mng‑sys\trunk\
   AddNewComponent.aspx
   AddNewComponent.aspx.cs
   ADLogin.aspx
   ADLogin.aspx.cs
   ...SearchActionChoice.aspx
   ...rchActionChoice.aspx.cs
   CathayBkRSS.xml
   Comment.aspx
   Comment.aspx.cs
   ...n-component-mng-sys.sln
   ...onent-mng-sys_Model.tgs
   ComponentsList.html
   Default.aspx
   Default.aspx.cs
   Downloading.aspx
   Downloading.aspx.cs
   ErrorPage.htm
   Global.asax
   Logon.aspx
   Logon.aspx.cs
   ManagerMain.aspx
   ManagerMain.aspx.cs
   MasterPage.master
   MasterPage.master.cs
   ReviseComponent.aspx
   ReviseComponent.aspx.cs
   SearchComponent.aspx
   SearchComponent.aspx.cs
   SearchResult.aspx
   SearchResult.aspx.cs
   StatisticsReport.aspx
   StatisticsReport.aspx.cs
   ...oDownloadComponent.aspx
   ...wnloadComponent.aspx.cs
   web.config
   Web.sitemap
   ...ejectReasonAndMail.aspx
   ...ctReasonAndMail.aspx.cs

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Downloading : System.Web.UI.Page
{
    private string strFileSavePath =
           System.Web.Hosting.HostingEnvironment.ApplicationPhysicalPath;
    protected void Page_Load(object sender, EventArgs e)
    {


        string defaultFileRoot = @"C:\CCOM\";
        string userRequest = Request.QueryString["URL"];
        //string userRequest = "B";
        if (!String.IsNullOrEmpty(userRequest))
        {
            userRequest = "MEIScOMPONENT.zip";  //for debugging
            string filePlace = defaultFileRoot + userRequest;            
            Response.ContentType = "application/save-as";
            Response.AddHeader("content-disposition", "attachment; filename=" + userRequest);           
            Response.WriteFile(filePlace);            
        }
        else { 
        
         
        }
        
        
//        Response.Write("You downloaded the file");
  //      Response.Flush();     
    }
}