catalyst2 community forums  

Go Back   catalyst2 community forums > New Users > How-To?

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old 13-08-2007, 08:23 PM   #1 (permalink)
Registered User
 
Join Date: Jul 2003
Location: Yeovil
Posts: 8
Unhappy User File Uploading

Hi,

Can anyone let me know if I can allow my users to upload files to the server my site is hosted on. I would like to use the ASP.net 2.0 file upload control.

Is this possible and if so what would the upload path be? Would the user need to supply any credentials?


Thanks for your help

Darren.
codeless is offline   Reply With Quote
Old 14-08-2007, 09:38 AM   #2 (permalink)
Bring me your problems :p
 
paulredpath's Avatar
 
Join Date: Jan 2003
Location: /dev/ahhhhhhhhh
Posts: 3,536
Hi,

We don't have any code examples, however another user on the forums may be able to share some with you

The path to your site is shown in HELM under 'web site settings', this is the path to the root of your domain.
paulredpath is offline   Reply With Quote
Old 14-08-2007, 11:10 AM   #3 (permalink)
Administrator
 
WhiskyFudge's Avatar
 
Join Date: Oct 2003
Posts: 1,484
It's really easy. I've give the example in c# but it's easy enough to work out what it should be in VB or any other .net language.

Add
Code:
<asp:FileUpload ID="fileUpload" runat="server" />
to your aspx page

Add
Code:
fileUpload.SaveAs(@"D:\Domains\mydomain.com\wwwroot\myfile.txt");
to a postback event (button click method ect)

See http://http://msdn2.microsoft.com/en...ileupload.aspx for further info.

HTH

Jas
__________________
Jason Robbins
jason@catalyst2.com
WhiskyFudge is offline   Reply With Quote
Old 14-08-2007, 08:33 PM   #4 (permalink)
Registered User
 
Join Date: Jul 2003
Location: Yeovil
Posts: 8
Smile

Hi,

Thanks for the info.

I got the code already (c#), it was really just the possibility and path I was after.

much appreciated

Thanks

Darren.
codeless is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 09:36 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.