title: Formatting an asp:DataPager to show in ul li
body: <p>I am building a website using the Twitter Bootstrap and ASP.Net C# Webforms.  I have a ListView on my page with a DataPager bound to it, but I need to change the way .Net renders the HTML of the DataPager.</p>
  
  <p>Currently, all pager items are displaying like this:</p>
  
  <pre><code>&lt;div class="clearfix pagination pagination-centered"&gt; &lt;span id="cpBody_dpListing"&gt; &lt;a class="aspNetDisabled"&gt;First&lt;/a&gt;&amp;nbsp;&lt;span&gt;1&lt;/span&gt;&amp;nbsp; &lt;a href="javascript:__doPostBack('ctl00$cpBody$dpListing$ctl02$ctl01','')"&gt;2&lt;/a&gt;&amp;nbsp; &lt;a href="javascript:__doPostBack('ctl00$cpBody$dpListing$ctl03$ctl00','')"&gt;Last&lt;/a&gt;&amp;nbsp; &lt;/span&gt; &lt;/div&gt;
  </code></pre>
  
  <p>however I need to wrap all my items in an unordered list rather than span and a tags.
  My current mark-up looks like this:</p>
  
  <pre><code>&lt;div class="clearfix pagination pagination-centered"&gt;
  &lt;asp:DataPager ID="dpListing" runat="server" PagedControlID="lvListing" PageSize="10" OnPreRender="dpListing_PreRender"&gt;
      &lt;Fields&gt;
          &lt;asp:TemplatePagerField&gt;
              &lt;PagerTemplate&gt;
                  &lt;asp:BulletedList ID="listPages" runat="server" DisplayMode="LinkButton" OnClick="listPages_Click"&gt;&lt;/asp:BulletedList&gt;
              &lt;/PagerTemplate&gt;
          &lt;/asp:TemplatePagerField&gt;
          &lt;asp:NextPreviousPagerField ButtonType="Link" ShowFirstPageButton="true" ShowNextPageButton="false" ShowPreviousPageButton="false" /&gt;
          &lt;asp:NumericPagerField PreviousPageText="&amp;lt; Prev 10" NextPageText="Next 10 &amp;gt;" ButtonCount="10" /&gt;
          &lt;asp:NextPreviousPagerField ButtonType="Link" ShowLastPageButton="true" ShowNextPageButton="false" ShowPreviousPageButton="false" /&gt;
      &lt;/Fields&gt;
  &lt;/asp:DataPager&gt;
  </code></pre>
  
  <p></p>
  
  <p>I somehow need to override the NextPreviousPagerField and NumericPagerField so they output &lt;li&gt; tags rather than &lt;span&gt; and &lt;a&gt;.</p>