title: using qTip inside asp.net listview itemtemplate
body: <p>I am trying to use <strong><a href="http://craigsworks.com/projects/qtip/" rel="nofollow">qTip</a></strong> inside an ASP.NET ListView. The page uses a MasterPage. There is an Image in each Item which will show a DataBound value when hovered. </p>
  
  <p>Below is my ItemTemplate code:</p>
  
  <pre><code>&lt;ItemTemplate&gt; 
  
      &lt;p&gt; 
          &lt;%# Eval("Name")%&gt;
          &amp;nbsp;&amp;nbsp;
          &lt;asp:Image ID="imgInfo" runat="server" 
                     align="right" 
                     ImageUrl="~/App_Themes/Default/images/question.png" /&gt;
      &lt;/p&gt; 
  
      &lt;asp:TextBox ID="txtValue" runat="server" 
                   TextMode="MultiLine" 
                   Rows="4" 
                   SkinID="dummy" 
                   Text='&lt;%# Bind("Value") %&gt;' /&gt;
  
      &lt;asp:Label ID="lblHelpText" runat="server" 
                 Text='&lt;%# Eval("HelpText")%&gt;'  
                 Visible="false" /&gt;
  
      &lt;script language="javascript" type="text/javascript"&gt; 
  
          $('[#ContentPlaceHolder1_lvStep1_imgInfo_0]').qtip({ 
  
              content: 'the tooltip text, I want text of lblHelpText here', 
              style: { name: 'blue' } 
  
          });
  
      &lt;/script&gt; 
  
  &lt;/ItemTemplate&gt;
  </code></pre>
  
  <p>My Questions: </p>
  
  <ol>
  <li><p>This way the Id has been hard
  coded, so works just on one item. I
  could not find a selector that would
  select the Ids for me. </p></li>
  <li><p>I need the lblHelpText.Text or
  &lt;%# Eval("HelpText")%> as the
  tooltip text (content : ) </p></li>
  <li><p>Since the script is within the
  ItemTemplate, it would be created as
  many times the number of items. Is
  there a way I can achieve all this
  by having script at one place
  (outside ItemTemplate)?</p></li>
  </ol>
  
  <p>Your help will be most appreciated,</p>
  
  <p>Ali</p>