IZWebFileManager
Advanced ASP.NET File Manager
Welcome to IZWebFileManager
Sign in
|
Join
|
Help
in
Bugs/Problems/Errors (forum)
IZWebFileManager (group)
(Entire Site)
Search
Home
Features
Demo
Forums
Download, License & Source Code
The forum is moved to
http://groups.google.com/group/izwebfilemanager
If you have any question, please post there. Thanks!
IZWebFileManager
»
IZWebFileManager
»
Bugs/Problems/Errors
»
Download from an ASP Button
Download from an ASP Button
Last post 06-24-2010, 1:39 AM by
MarkJ
. 4 replies.
Sort Posts:
Oldest to newest
Newest to oldest
Previous
Next
06-22-2010, 5:40 AM
525
MarkJ
Joined on 04-18-2009
Posts 29
Download from an ASP Button
In the Opera and Chrome browsers the right click menu does not work.
I would like to provide a Download ASP button to download a selected file.
How can I call the download from an ASP button?
Report abuse
06-23-2010, 10:04 AM
528
in reply to
525
igor
Joined on 06-02-2006
Posts 233
Re: Download from an ASP Button
use SelectedItems property
for example, put your button on the page and handle it's click event:
void Button1_Click(object sender, EventArgs e)
{
var selectedItems = FileManager1.SelectedItems;
// response with download stream here
}
Report abuse
06-23-2010, 11:36 AM
529
in reply to
528
MarkJ
Joined on 04-18-2009
Posts 29
Re: Download from an ASP Button
Thanks Igor,
However I actually wanted to call file managers download as in the right click menu.
This is so I can place code in the file manager download event.
Regards Mark.
Report abuse
06-23-2010, 1:36 PM
531
in reply to
529
igor
Joined on 06-02-2006
Posts 233
Re: Download from an ASP Button
put asp HyperLink on the page
<asp:HyperLink runat="server" ID="DownloadLink" Text="Download"></asp:HyperLink>
in code behind set it's NavigationUrl:
DownloadLink.NavigateUrl = "javascript:WFM_" + FileManager1.Controller.ClientID + ".OnExecuteCommand(WFM_" +
FileManager1.ClientID + "_FileView, '0:-2');void(0);";
Report abuse
06-24-2010, 1:39 AM
533
in reply to
531
MarkJ
Joined on 04-18-2009
Posts 29
Re: Download from an ASP Button
Thanks Igor,
That works very well.
Regards ..... Mark
Report abuse
www.IZWebFileManager.com
izwebfilemanager@gmail.com