title: Sharepoint custom Web Part
body: <p>I've a got a code snippet below modified from <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webpartpages.webpart.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webpartpages.webpart.aspx</a> :</p>
  
  <pre><code>public class WebPartBla : Microsoft.SharePoint.WebPartPages.WebPart
  {
      private ArrayList someList;
  
      protected override void CreateChildControls()
      {
          someList = new ArrayList();
  
          SPWeb myWeb = SPControl.GetContextWeb(this.Context);
          foreach(SPList list in myWeb.Lists)
          {
              if (list.BaseTemplate == SPListTemplateType.Tasks)
              {
                  someList(list.Description);
              }
          }
      }
  
      /// &lt;summary&gt;
      /// Render this Web Part to the output parameter specified.
      /// &lt;/summary&gt;
      /// &lt;param name="output"&gt; The HTML writer to write out to &lt;/param&gt;
      protected override void RenderWebPart(HtmlTextWriter output)
      {
          string strHTML = "";
          for (int i = 0; i &lt; someList.Count; i++)
          {
              strHTML = strHTML + "The task " + someList.Description + "&lt;BR&gt;&lt;BR&gt;";
          }
          output.Write(strHTML);
      }
  }
  </code></pre>
  
  <p>Could anyone please help me with </p>
  
  <ol>
  <li>how to use this code as SharePoint Web Part?</li>
  <li>how to deploy this to the sharepoint as web part?</li>
  <li>how does the RenderWebPart method above gets used?</li>
  </ol>