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
newbiewebSr. Software EngineerAsked:
Who is Participating?
 
AliSyedConnect With a Mentor Commented:
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
All Courses

From novice to tech pro — start learning today.