title: Asp.net content place holder using javascript
body: <p>I have a annoying issue involving javascript/jquery and asp:ContentPlaceHolders that I can't seem to solve and I've been trying all day.</p>
  
  <p>I have an ASP.NET website with C#. The front page - Default.aspx, has a master page - MasterPage.master. I also have a control - bslider.ascx</p>
  
  <p>I am trying to implement the image slider shown at <a href="http://bxslider.com/" rel="nofollow">http://bxslider.com/</a></p>
  
  <p>The code in my control looks like this</p>
  
  <pre><code>&lt;script src="../scripts/jquery.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;script src="../js/jquery.bxSlider.min.js" type="text/javascript"&gt;
      $(document).ready(function () {
          $('#slider1').bxSlider();
      });    
  &lt;/script&gt;
  
  &lt;div id="slider1"&gt;
      &lt;div&gt;Slide one content&lt;/div&gt;
      &lt;div&gt;Slide two content&lt;/div&gt;
      &lt;div&gt;Slide three content&lt;/div&gt;
      &lt;div&gt;And so on...&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The relevant code in Default.aspx is as follows:</p>
  
  <pre><code>&lt;asp:Content ID="Content4" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server"&gt;
      &lt;div class="sliderContainer"&gt;
          &lt;uc4:BSlider ID="slider1" runat="server" /&gt;  
      &lt;/div&gt;
  &lt;/asp:Content&gt;  
  </code></pre>
  
  <p>The relevant code in MasterPage.master is as follows:</p>
  
  <pre><code>&lt;body&gt;
  &lt;form id="form1" runat="server"&gt;
      &lt;div id="ContentContainer"&gt;
          &lt;asp:contentplaceholder id="ContentPlaceHolder2" runat="server"&gt;
              &lt;uc3:headerLeft ID="Header2" runat="server" /&gt; 
          &lt;/asp:contentplaceholder&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>However this does not work, it displays the content of the inner divs but one after another. I have tested this in a standard .html web page and it worked so it must be to do with the ASP.NET side of things.</p>
  
  <p>Can anyone help with this issue? </p>
  
  <p>Thanks in advance.</p>