title: Include CSS in Sharepoint2010 (non visual) Webpart
body: <p>i'm stuck for hours now to figure out how the heck i can get my Stylesheets into my Webpart. Now i've found several resources claiming on how it works</p>
  
  <ul>
  <li><a href="http://www.c-sharpcorner.com/uploadfile/manni_prince/embedding-css-file-in-custom-webpart-in-sharepoint/" rel="nofollow noreferrer">http://www.c-sharpcorner.com/uploadfile/manni_prince/embedding-css-file-in-custom-webpart-in-sharepoint/</a></li>
  <li><a href="https://stackoverflow.com/questions/5471816/using-custom-css-within-a-sharepoint-webpart-as-a-embedded-resource-is-not-worki">Using custom css within a Sharepoint webpart as a Embedded Resource is not working, why?</a></li>
  <li>some others, too, basically doing the same</li>
  </ul>
  
  <p>Now the first one works. But it shouldn't really be needed to manually place a single CSS File in a specific folder on each System (Dev, Test, Live). There has to be a way to embedd the Webpart into the deployment file for the project.</p>
  
  <p>Searching for this i came up with the second link i've posted. This pretty much LOOKS like something i wanna do, but i simply can not get it to work.</p>
  
  <p>My Structure is the following:</p>
  
  <pre><code>./SOLUTION
    &gt; Properties
    &gt; References
    &gt; ...
    &gt; Webpart1
      &gt; ...
    &gt; Webpart2
      &gt; Webpart2.css
      &gt; ...
    &gt; Styles (A Folder of VS Style 'Module')
      &gt; wp2.css
  </code></pre>
  
  <p>Would someone be so kind to tell me how i can include the wp2.css into the sharepoint page only if the webpart is visible on the page. Without the need of me manually needing to place the css file as pointed out in link 1.</p>
  
  <p>Thanks a lot in advance!</p>