Solved

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

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
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!
This video discusses moving either the default database or any database to a new volume.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

762 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now