Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Download Files in Custom ModulesDownload Files in Custom Modules
Previous
 
Next
New Post
5/26/2007 4:26 PM
 

Hello

I have a module that creates a CSV file that I want my users to download.  I placed the file in a folder "Portals/0/Extract"  when I put the URL together  https://my.site.edu/Potals/0/Extract/myfile.cvs  for example what ends up on the URL when I try to access it is https://my.site.edu/myfile.cvs     I have turned off the Friendly URL's bucause my first attepts where putting in the tab=# stuff and then myfile.cvs.   

Is there any way around this?  As the file name is built dynamicly I can't hard code a menu option to point to the file or I woudl have done that.  I am thinking the only work around I can think of is to store the file in a folder and have the end uers connect via UNC drive map and grabe the file with their inistials and todays date.  Then I have to deal with keeping that folder cleaned out from time to time...

Thanks for any ideas...   For what its worth I am writing my program in C#.

Thanks

 

 
New Post
5/27/2007 7:16 AM
 

try using the methods in filesystemutilities, this guarantees access to all portal files regardless of folder type etc.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
5/27/2007 12:11 PM
 

I have looked through there, but all I see is how to write files to and from the file system. that is not an issue, the file is created just fine. I can go to it open it in NotePad and the content is correct..   Something is changing the URL when it is being added to the NavigateURL link button.   I did not see any examples in the sorce code of how to do this correctly.

 

// Build Output File Name
string OutputFile_Path = @"D:\InetPub\DNN4\Website\Portals\0\Extracts\";
string OutputFile_URL = "https://my.website.edu/Portals/0/Extracts/";
string OutputFile = cuName + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString() + DateTime.Now.Millisecond.ToString() + ".csv";

OutputFile_Path = OutputFile_Path + OutputFile;
OutputFile_URL = OutputFile_URL + OutputFile;

.... other code ....
if output file was created then this code

hlnk_DownloadFile.Visible =

hlnk_DownloadFile.Text =

true;"Download File";
hlnk_DownloadFile.NavigateURL = OutputFile_URL;

// Turn on Download Button

 
New Post
5/27/2007 1:03 PM
 

I have resolved my issue.  Thanks

 

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Download Files in Custom ModulesDownload Files in Custom Modules


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out