title: Can I call a code behind function from a div onclick event?
body: <p>I have a bunch of divs on my page that are added at run time dynamically. 
  When any of the dynamically added divs are clicked - All need to call the same function in my code behind. Each of the divs must pass it's own ID to the function.
  I can't use web methods as the function needs to identify which div was clicked and then show/hide/populate other controls on the page.</p>
  
  <p>Cheers guys</p>
  
  
              Header Controls and stuff go here
           
  
  <pre><code>    &lt;div id="div_Footer" class="HoverEdit" title="Click To Edit" runat="server" onclick="EditDiv(div_Footer)"&gt;
          Footer Controls and stuff go here
      &lt;/div&gt;
  </code></pre>
  
  <p>and then in the code behind :</p>
  
  <pre><code>Sub EditDiv(ID_ofDiv As String)
  
      'Do some stuff to the controls on the page
      'Swapping tabs, showing /hiding controls etc.
  
  End Sub
  </code></pre>