title: Serving static file on ASP.NET MVC (C#)
body: <p>I am completely new to .NET framework and i would like to know what is the best way to serve static content and to access user generated content.</p>
  
  <p>Suppose i have the following files:</p>
  
  <pre><code>logo.jpg
  document.pdf
  etc.doc
  </code></pre>
  
  <p>Where should i put this (on which folders) ? And how do i access it?</p>
  
  <p>Lastly, taking it into another level. Suppose i have a web apps that allows user to upload a document (let say some pics). What i would like to know is how should the structure of my folder/directory look like?</p>
  
  <p>normaly in django / CI i would have a folder as follows:</p>
  
  <p>application/{all-web-app-related-folder-and-file-goes-here}
  uploads/{all-related-user-generated-content-goes-here-categorized-by-file-type}
  assets/{css-javascript-document-would-go-here}</p>
  
  <p>note: i haven't done anything or made any attempt to it. Simply because i have no idea how to access try static content. I once tried to access the *.css or *.js files located inside Content/Scripts folder.</p>
  
  <p>i.e: localhost:12345/Scripts/jquery.js</p>
  
  <p>It turns out, it is not a straightforward process in ASP.NET MVC</p>
  
  <p><strong><em>Oh by the way,</em></strong> in certain occasion, i would also like to access my images from my css file instead. Which raises yet another confusion to me. </p>
  
  <p><strong>EDIT 1:</strong> I read the following article</p>
  
  <p><a href="http://www.c-sharpcorner.com/uploadfile/dhananjaycoder/working-with-images-in-Asp-Net-mvc-framework/" rel="nofollow">http://www.c-sharpcorner.com/uploadfile/dhananjaycoder/working-with-images-in-Asp-Net-mvc-framework/</a></p>
  
  <p>however it is not applicable to my current version of MVC (i am using MVC 5)</p>
  
  <p><strong>EDIT 2</strong>: So, this is what i have been experimenting so far</p>
  
  <ol>
  <li>I created a folder called <em>Assets</em> on the root directory (same level as Models, Controllers, etc).</li>
  <li>Inside Asset i create sub-folders (i.e. images, documents, etc)</li>
  <li><p>Then i want to access those file directly from my views i would go like this:</p>
  
  <p>img src="@Url.Content("~/Asset/images/picture.png")"</p></li>
  </ol>
  
  <p>The above example is appropriate if i want to access image file.</p>
  
  <p>I however not sure if this is the ideal way to do it. It is however, the simplest solution i can come across at the moment (or should i say, rather naive).</p>
  
  <p>Any hints would be appreciated.</p>