Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SharePoint > SharePoint Development
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
SharePoint Development Programming and development for SharePoint Portal Server and Windows SharePoint Services
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SharePoint Development section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 24th, 2007, 08:07 AM
Authorized User
Join Date: Jun 2007
Location: , , .
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default Issue after downloading file in ASP.NET page

Hi all,

       I am developing a sharepoint site using ASP.NET application.
       In a ASP.NET page, iam downloading file from sqlserver db.
       It works fine in ASP.NET application, but when i put into
       sharepoint, it shows some problem.
       The file gets downloaded but after clocking save,
       open or cancel in save dilogbox,the page shows no response.
       That is, no event has been occured like server button
       click or anything.
       The code i used is:

protected void lnkbtnDownload_Click(object sender, EventArgs e)
        objEmployeeLeave.GetEMPSelectLeaveView(); //To load the file
        string filename = "LeaveAttachDocument";
        string name = "";
        if (objEmployeeLeave.FileAttatchext == ".doc")
            name = filename + ".doc";
        else if (objEmployeeLeave.FileAttatchext == ".txt")
            name = filename + ".txt";


        Response.AddHeader("Content-Disposition", "attachment; filename=" + file);
        Response.AddHeader("Content-Length", file.Length.ToString());
        Response.ContentType = "application/octet-stream";
        //Response.BinaryWrite(objEmployeeLeave.FileAttatch) ;
        Please view the above code and provide solution for this issue.I had searched in many sites.But i havent get clear solution.

Thank You all,
Subhashni Palanivel.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I execute .exe file from asp.net page suri_thanda ASP.NET 1.0 and 1.1 Professional 4 May 10th, 2005 01:17 AM
Issue of downloading Excel file(resent) zuolinbai Classic ASP Professional 3 June 15th, 2004 11:10 AM
Issue of downloading Excel file(resent) zuolinbai Classic ASP Basics 1 June 10th, 2004 05:24 PM
Issue of downloading Excel file zuolinbai Classic ASP Professional 1 June 7th, 2004 05:50 PM
.NET class file in ASP page shahpragnesh_p VS.NET 2002/2003 1 August 22nd, 2003 10:50 AM

All times are GMT -4. The time now is 06:59 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.