Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 322
  • 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
 
newbiewebSr. Software EngineerAuthor Commented:
Great.  How do I then use it in my program?
0
 
newbiewebSr. Software EngineerAuthor Commented:
And does it matter where i place it?  Should it go inside here?

<configuration>
</configuration>
0
 
newbiewebSr. Software EngineerAuthor Commented:
Thanks.  I got it working as you described. Cheers.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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