Solved

Where in Web.Config do I define a file save path using MVC2?

Posted on 2010-11-10
4
303 Views
Last Modified: 2012-05-10
I need to use the Web.Config to save the path I will use to save files uploaded by the user. Where is the right place to define this?  I mean what tags do I use?

Then how do I reference it in the code?

Thanks,
newbieweb
0
Comment
Question by:newbieweb
  • 3
4 Comments
 
LVL 6

Accepted Solution

by:
AliSyed earned 500 total points
ID: 34103551
You can use add key
<add key="mypath" value="C:\"/>

Ali Syed
0
 

Author Comment

by:newbieweb
ID: 34103616
Great.  How do I then use it in my program?
0
 

Author Comment

by:newbieweb
ID: 34103629
And does it matter where i place it?  Should it go inside here?

<configuration>
</configuration>
0
 

Author Closing Comment

by:newbieweb
ID: 34114925
Thanks.  I got it working as you described. Cheers.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question