title: Getting to the web part gallery in sharepoint via code
body: <p>I am currently trying to add a web part to a page. All i think is well however i am using a piece of code that i thought returned all existing webparts but really it only returns the web parts that are currently on a given page.</p>
  
  <pre><code>web.GetWebPartCollection(url,storage);
  </code></pre>
  
  <p>I was hoping to get the reference to my web part that already resides in the web part gallery from the collection returned by the above code but my web part hasn't been deployed to the page yet as that's what i am trying to do!!!!</p>
  
  <p>Does anyone know how i can get access to the web part gallery via a piece of c# code?</p>