Solved

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

Posted on 2010-11-10
4
304 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

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

790 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