[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 314
  • Last Modified:

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

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
newbieweb
Asked:
newbieweb
  • 3
1 Solution
 
AliSyedCommented:
You can use add key
<add key="mypath" value="C:\"/>

Ali Syed
0
 
newbiewebAuthor Commented:
Great.  How do I then use it in my program?
0
 
newbiewebAuthor Commented:
And does it matter where i place it?  Should it go inside here?

<configuration>
</configuration>
0
 
newbiewebAuthor Commented:
Thanks.  I got it working as you described. Cheers.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now