Solved

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

Posted on 2010-11-10
4
306 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
asp.net mvc5 6 33
SQL State HYT00. Timeout expired proplem 8 44
XML XDocument extract - Keeping a node list like a menu path 8 33
Intermittent OleDbConnection Error 20 53
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

739 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