• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 326
  • 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

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

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