Click here to Skip to main content
15,898,996 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: To upload a file without using upload file ? Pin
N a v a n e e t h9-Dec-07 20:30
N a v a n e e t h9-Dec-07 20:30 
AnswerRe: To upload a file without using upload file ? Pin
Christian Graus9-Dec-07 21:16
protectorChristian Graus9-Dec-07 21:16 
GeneralDataList Item Enumeration in ASP .NET 2.0 Pin
ReactiveX9-Dec-07 20:01
ReactiveX9-Dec-07 20:01 
GeneralRe: DataList Item Enumeration in ASP .NET 2.0 Pin
ReactiveX9-Dec-07 20:42
ReactiveX9-Dec-07 20:42 
QuestionEncrypt and Decrypt? Pin
Kasi Viswanathan9-Dec-07 19:51
Kasi Viswanathan9-Dec-07 19:51 
GeneralRe: Encrypt and Decrypt? Pin
Christian Graus9-Dec-07 19:52
protectorChristian Graus9-Dec-07 19:52 
GeneralRe: Encrypt and Decrypt? Pin
Michael Sync9-Dec-07 20:56
Michael Sync9-Dec-07 20:56 
QuestionDownload File Pin
serene joey9-Dec-07 19:46
serene joey9-Dec-07 19:46 
Hi experts,
I need a linkbutton/button to download the files which my clients have uploaded.

Below is my upload method and it works.

protected void uploadFile()<br />
    {<br />
        String projectID = (String)Session["projId"];<br />
        //change the file name<br />
        if (!FileUpload.FileName.Equals(""))<br />
        {<br />
            // Create a new folder in Docs folder (folder name = projectID)<br />
            System.IO.Directory.CreateDirectory(Server.MapPath("Docs/") + projectID);<br />
<br />
            // Save the file into the new folder.<br />
            FileUpload.PostedFile.SaveAs(Server.MapPath("Docs/" + projectID + "/" + FileUpload.FileName));<br />
            lblFile.Text = FileUpload.FileName + " is uploaded!";<br />
            lblFile.Visible = true;<br />
<br />
        }<br />
    }//end of method



However, it's not working for downloading of file (in another asp)
May I know how can I do that?

protected void btnLink_OnClientClick(object sender, EventArgs e)<br />
{<br />
   String projectID = (String)Session["projId"];<br />
   String file1 = System.IO.Path.GetFileName(Server.MapPath("Docs/" + pid + "/"));<br />
}


The files format that are uploaded are not consistent. Usually it's excel, word or pdf format.

Please help. Thanks!

serene

GeneralRe: Download File Pin
Christian Graus9-Dec-07 19:54
protectorChristian Graus9-Dec-07 19:54 
GeneralRe: Download File Pin
N a v a n e e t h9-Dec-07 19:56
N a v a n e e t h9-Dec-07 19:56 
GeneralExecution Problem Pin
Member 46484919-Dec-07 19:41
Member 46484919-Dec-07 19:41 
GeneralRe: Execution Problem Pin
Sun Rays9-Dec-07 19:46
Sun Rays9-Dec-07 19:46 
GeneralRe: Execution Problem Pin
Member 46484919-Dec-07 19:55
Member 46484919-Dec-07 19:55 
GeneralRe: Execution Problem Pin
Member 46484919-Dec-07 20:01
Member 46484919-Dec-07 20:01 
GeneralRe: Execution Problem Pin
Sun Rays9-Dec-07 20:08
Sun Rays9-Dec-07 20:08 
GeneralDisplay tree structure in asp.net1.1 Pin
gopal_Pandey9-Dec-07 19:23
gopal_Pandey9-Dec-07 19:23 
GeneralRe: Display tree structure in asp.net1.1 Pin
Sun Rays9-Dec-07 19:36
Sun Rays9-Dec-07 19:36 
GeneralRe: Display tree structure in asp.net1.1 Pin
N a v a n e e t h9-Dec-07 19:42
N a v a n e e t h9-Dec-07 19:42 
Questionhow the data table retains its value with in pagescope Pin
jagan1239-Dec-07 18:50
jagan1239-Dec-07 18:50 
AnswerRe: how the data table retains its value with in pagescope Pin
Sun Rays9-Dec-07 19:01
Sun Rays9-Dec-07 19:01 
GeneralRe: how the data table retains its value with in pagescope Pin
jagan1239-Dec-07 19:03
jagan1239-Dec-07 19:03 
GeneralRe: how the data table retains its value with in pagescope Pin
Sun Rays9-Dec-07 19:09
Sun Rays9-Dec-07 19:09 
GeneralRe: how the data table retains its value with in pagescope Pin
jagan1239-Dec-07 19:13
jagan1239-Dec-07 19:13 
GeneralRe: how the data table retains its value with in pagescope Pin
Sun Rays9-Dec-07 19:18
Sun Rays9-Dec-07 19:18 
GeneralRe: how the data table retains its value with in pagescope Pin
jagan1239-Dec-07 19:37
jagan1239-Dec-07 19:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.